Skip to content

Commit ba19a80

Browse files
committed
Drop double-semicolon in C
The worst offenders are "continue;;" and "break;;" in switch statements. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 057e713 commit ba19a80

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

fast-import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ static char *create_index(void)
869869
/* Generate the fan-out array. */
870870
c = idx;
871871
for (i = 0; i < 256; i++) {
872-
struct object_entry **next = c;;
872+
struct object_entry **next = c;
873873
while (next < last) {
874874
if ((*next)->sha1[0] != i)
875875
break;

rerere.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static int do_plain_rerere(struct string_list *rr, int fd)
290290
hex = xstrdup(sha1_to_hex(sha1));
291291
string_list_insert(path, rr)->util = hex;
292292
if (mkdir(git_path("rr-cache/%s", hex), 0755))
293-
continue;;
293+
continue;
294294
handle_file(path, NULL, rr_path(hex, "preimage"));
295295
fprintf(stderr, "Recorded preimage for '%s'\n", path);
296296
}

tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ int read_tree_recursive(struct tree *tree,
110110
case 0:
111111
continue;
112112
case READ_TREE_RECURSIVE:
113-
break;;
113+
break;
114114
default:
115115
return -1;
116116
}

walker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void walker_say(struct walker *walker, const char *fmt, const char *hex)
1818
static void report_missing(const struct object *obj)
1919
{
2020
char missing_hex[41];
21-
strcpy(missing_hex, sha1_to_hex(obj->sha1));;
21+
strcpy(missing_hex, sha1_to_hex(obj->sha1));
2222
fprintf(stderr, "Cannot obtain needed %s %s\n",
2323
obj->type ? typename(obj->type): "object", missing_hex);
2424
if (!is_null_sha1(current_commit_sha1))

0 commit comments

Comments
 (0)