Drop double-semicolon in C
The worst offenders are "continue;;" and "break;;" in switch statements. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
057e71384a
commit
ba19a808aa
@ -869,7 +869,7 @@ static char *create_index(void)
|
|||||||
/* Generate the fan-out array. */
|
/* Generate the fan-out array. */
|
||||||
c = idx;
|
c = idx;
|
||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
struct object_entry **next = c;;
|
struct object_entry **next = c;
|
||||||
while (next < last) {
|
while (next < last) {
|
||||||
if ((*next)->sha1[0] != i)
|
if ((*next)->sha1[0] != i)
|
||||||
break;
|
break;
|
||||||
|
2
rerere.c
2
rerere.c
@ -290,7 +290,7 @@ static int do_plain_rerere(struct string_list *rr, int fd)
|
|||||||
hex = xstrdup(sha1_to_hex(sha1));
|
hex = xstrdup(sha1_to_hex(sha1));
|
||||||
string_list_insert(path, rr)->util = hex;
|
string_list_insert(path, rr)->util = hex;
|
||||||
if (mkdir(git_path("rr-cache/%s", hex), 0755))
|
if (mkdir(git_path("rr-cache/%s", hex), 0755))
|
||||||
continue;;
|
continue;
|
||||||
handle_file(path, NULL, rr_path(hex, "preimage"));
|
handle_file(path, NULL, rr_path(hex, "preimage"));
|
||||||
fprintf(stderr, "Recorded preimage for '%s'\n", path);
|
fprintf(stderr, "Recorded preimage for '%s'\n", path);
|
||||||
}
|
}
|
||||||
|
2
tree.c
2
tree.c
@ -110,7 +110,7 @@ int read_tree_recursive(struct tree *tree,
|
|||||||
case 0:
|
case 0:
|
||||||
continue;
|
continue;
|
||||||
case READ_TREE_RECURSIVE:
|
case READ_TREE_RECURSIVE:
|
||||||
break;;
|
break;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
2
walker.c
2
walker.c
@ -18,7 +18,7 @@ void walker_say(struct walker *walker, const char *fmt, const char *hex)
|
|||||||
static void report_missing(const struct object *obj)
|
static void report_missing(const struct object *obj)
|
||||||
{
|
{
|
||||||
char missing_hex[41];
|
char missing_hex[41];
|
||||||
strcpy(missing_hex, sha1_to_hex(obj->sha1));;
|
strcpy(missing_hex, sha1_to_hex(obj->sha1));
|
||||||
fprintf(stderr, "Cannot obtain needed %s %s\n",
|
fprintf(stderr, "Cannot obtain needed %s %s\n",
|
||||||
obj->type ? typename(obj->type): "object", missing_hex);
|
obj->type ? typename(obj->type): "object", missing_hex);
|
||||||
if (!is_null_sha1(current_commit_sha1))
|
if (!is_null_sha1(current_commit_sha1))
|
||||||
|
Loading…
Reference in New Issue
Block a user