Skip to content

Commit

Permalink
mailmap: fix bogus for() loop that happened to be safe by accident
Browse files Browse the repository at this point in the history
The empty loop pretended to have an empty statement as its body by a
phony indentation, but in fact was slurping the next statement into it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Dec 8, 2007
1 parent 384b32c commit fd99b36
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions mailmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ int read_mailmap(struct path_list *map, const char *filename, char **repo_abbrev
continue;
if (right_bracket == left_bracket + 1)
continue;
for (end_of_name = left_bracket; end_of_name != buffer
&& isspace(end_of_name[-1]); end_of_name--)
/* keep on looking */
for (end_of_name = left_bracket;
end_of_name != buffer && isspace(end_of_name[-1]);
end_of_name--)
; /* keep on looking */
if (end_of_name == buffer)
continue;
name = xmalloc(end_of_name - buffer + 1);
Expand Down

0 comments on commit fd99b36

Please sign in to comment.