summaryrefslogtreecommitdiff
path: root/strbuf.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-06-27 13:44:25 -0700
committerJunio C Hamano <gitster@pobox.com>2009-06-27 13:44:25 -0700
commit2dc7f40d4424f66e1324a1600de3fcdd115ab07f (patch)
tree6680ff45aeb60a73e9c6bba6d0c779473e6f0e35 /strbuf.c
parent3f721d1d6d6e6e55dbb5bfcb0e09346478adbb72 (diff)
parent1bed73c64a354248d6b342e58df257e8233bcbd2 (diff)
downloadgit-2dc7f40d4424f66e1324a1600de3fcdd115ab07f.tar.gz
Merge branch 'maint'
* maint: gitweb/README: fix AliasMatch in example Test grep --and/--or/--not Test git archive --remote fread does not return negative on error
Diffstat (limited to 'strbuf.c')
-rw-r--r--strbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strbuf.c b/strbuf.c
index a88496030b..f03d11702b 100644
--- a/strbuf.c
+++ b/strbuf.c
@@ -260,7 +260,7 @@ size_t strbuf_fread(struct strbuf *sb, size_t size, FILE *f)
res = fread(sb->buf + sb->len, 1, size, f);
if (res > 0)
strbuf_setlen(sb, sb->len + res);
- else if (res < 0 && oldalloc == 0)
+ else if (oldalloc == 0)
strbuf_release(sb);
return res;
}