Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
optimize verify-pack a bit
[gitweb.git]
/
builtin-mailsplit.c
diff --git
a/builtin-mailsplit.c
b/builtin-mailsplit.c
index e4d977bafbc04fa2bfedfc2912fc87bed9de8e1e..ae2b4cb21bf4e691a044e2ace3cdd4861562ceca 100644
(file)
--- a/
builtin-mailsplit.c
+++ b/
builtin-mailsplit.c
@@
-52,13
+52,12
@@
int read_line_with_nul(char *buf, int size, FILE *in)
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;