X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=bundle.c;h=8a1d53ba29a434139123bd7d4e37db47ba8728cb;hb=dbdc07fcbe3a951df8a3869b42edb6fffd466486;hp=08020bc3a258e055a8f5f6974217cf482edc3ee3;hpb=8327ee8677e3cdee4fc3563b9e5565405068e41e;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;