Commit Diff


commit - f91b5c433d4c2fb2e80053859b6f15c9239b3231
commit + 695bc1ecccf24ece2b0b8a03a5f0d26ad5116a0e
blob - 4330e9e71a7dcd41735ee2f4222e4f39e824d121
blob + fad7f03e4f70f1513ceb7af03bb71e1e7907a950
--- lib/pkt.c
+++ lib/pkt.c
@@ -36,7 +36,7 @@ got_pkt_readn(ssize_t *off, int fd, void *buf, size_t 
 		if (r == -1)
 			return got_error_from_errno("read");
 		if (r == 0)
-			return NULL;
+			return got_error(GOT_ERR_EOF);
 		*off += r;
 	}
 	return NULL;