X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=bundle.c;h=b8acf3c18b600f1f413f95744ad281e3879b3f6e;hb=ec7ff5ba272b565ed093a98dc13dd5cd26aeac92;hp=4742f2734eeb3dee117ab02a422056cfee4f71ea;hpb=200888ef3bbc150cc20b99e0aa039c751c00e07a;p=git.git diff --git a/bundle.c b/bundle.c index 4742f2734..b8acf3c18 100644 --- a/bundle.c +++ b/bundle.c @@ -31,8 +31,8 @@ static int strbuf_readline_fd(struct strbuf *sb, int fd) while (1) { char ch; ssize_t len = xread(fd, &ch, 1); - if (len < 0) - return -1; + if (len <= 0) + return len; strbuf_addch(sb, ch); if (ch == '\n') break;