git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mailmap: fix bogus for() loop that happened to be safe by accident
@ 2007-12-08  1:32 Junio C Hamano
  2007-12-08  1:32 ` [PATCH 2/2] shortlog: code restruturing and clean-up Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2007-12-08  1:32 UTC (permalink / raw)
  To: git

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>
---
 mailmap.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/mailmap.c b/mailmap.c
index 8714167..f017255 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -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);
-- 
1.5.3.7-2182-g108b

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-12-08 17:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-08  1:32 [PATCH 1/2] mailmap: fix bogus for() loop that happened to be safe by accident Junio C Hamano
2007-12-08  1:32 ` [PATCH 2/2] shortlog: code restruturing and clean-up Junio C Hamano
2007-12-08  9:34   ` Wincent Colaiuta
2007-12-08 17:13   ` Alex Riesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).