summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9aa2309)
raw | patch | inline | side by side (parent: 9aa2309)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 25 May 2008 08:23:55 +0000 (01:23 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 25 May 2008 20:23:57 +0000 (13:23 -0700) |
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-mailsplit.c | patch | blob | history |
diff --git a/builtin-mailsplit.c b/builtin-mailsplit.c
index e4d977bafbc04fa2bfedfc2912fc87bed9de8e1e..ae2b4cb21bf4e691a044e2ace3cdd4861562ceca 100644 (file)
--- a/builtin-mailsplit.c
+++ b/builtin-mailsplit.c
for (;;) {
c = getc(in);
+ if (c == EOF)
+ break;
buf[len++] = c;
- if (c == EOF || c == '\n' || len + 1 >= size)
+ if (c == '\n' || len + 1 >= size)
break;
}
-
- if (c == EOF)
- len--;
buf[len] = '\0';
return len;