@matheusbsbs / matheus-bagliano / commits / ba19a808aa
Fork 0

Drop double-semicolon in C

The worst offenders are "continue;;" and "break;;" in switch statements. Signed-off-by: Junio C Hamano <gitster@pobox.com>

Junio C Hamano committed Feb 10, 2009 at 17:42 UTC ba19a808aa871f0eb20aaeeb205e086b04b726dc
4 files changed +4 -4
fast-import.c
+1 -1
@@ -869,7 +869,7 @@ static char *create_index(void)
869 /* Generate the fan-out array. */
870 c = idx;
871 for (i = 0; i < 256; i++) {
872 - struct object_entry **next = c;;
872 + struct object_entry **next = c;
873 while (next < last) {
874 if ((*next)->sha1[0] != i)
875 break;
rerere.c
+1 -1
@@ -290,7 +290,7 @@ static int do_plain_rerere(struct string_list *rr, int fd)
290 hex = xstrdup(sha1_to_hex(sha1));
291 string_list_insert(path, rr)->util = hex;
292 if (mkdir(git_path("rr-cache/%s", hex), 0755))
293 - continue;;
293 + continue;
294 handle_file(path, NULL, rr_path(hex, "preimage"));
295 fprintf(stderr, "Recorded preimage for '%s'\n", path);
296 }
tree.c
+1 -1
@@ -110,7 +110,7 @@ int read_tree_recursive(struct tree *tree,
110 case 0:
111 continue;
112 case READ_TREE_RECURSIVE:
113 - break;;
113 + break;
114 default:
115 return -1;
116 }
walker.c
+1 -1
@@ -18,7 +18,7 @@ void walker_say(struct walker *walker, const char *fmt, const char *hex)
18 static void report_missing(const struct object *obj)
19 {
20 char missing_hex[41];
21 - strcpy(missing_hex, sha1_to_hex(obj->sha1));;
21 + strcpy(missing_hex, sha1_to_hex(obj->sha1));
22 fprintf(stderr, "Cannot obtain needed %s %s\n",
23 obj->type ? typename(obj->type): "object", missing_hex);
24 if (!is_null_sha1(current_commit_sha1))