diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c index 103fc1ec3..a68d242bc 100644 --- a/src/transports/smart_protocol.c +++ b/src/transports/smart_protocol.c @@ -493,7 +493,7 @@ int git_smart__download_pack( git__free(pkt); } else if (pkt->type == GIT_PKT_DATA) { git_pkt_data *p = (git_pkt_data *) pkt; - if ((error = writepack->add(writepack, p->data, p->len, stats)) != 0) + if ((error = writepack->add(writepack, p->data, p->len, stats)) < 0) goto on_error; git__free(pkt);