X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=bundle.c;h=8a1d53ba29a434139123bd7d4e37db47ba8728cb;hb=39cb6445d9bf5794723bb656499168c3d1b31774;hp=08020bc3a258e055a8f5f6974217cf482edc3ee3;hpb=fc545433bdab7ec17e6609d2249771d407370a4d;p=git.git diff --git a/bundle.c b/bundle.c index 08020bc3a..8a1d53ba2 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;