Commit ea57f66b5786704448152ebd95139802826bef1d

Ben Straub 2013-02-06T11:02:29

Expect standard error code from internal calls

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c
index 103fc1e..a68d242 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);