git/fetch: use read for reading packfiles instead of readn

This commit is contained in:
Michael Forney 2022-03-18 23:45:43 +00:00
parent 02d1725d71
commit 638b82129e

View file

@ -279,7 +279,7 @@ fetchpack(Conn *c)
fprint(2, "fetching...\n"); fprint(2, "fetching...\n");
packsz = 0; packsz = 0;
while(1){ while(1){
n = readn(c->rfd, buf, sizeof buf); n = read(c->rfd, buf, sizeof buf);
if(n == 0) if(n == 0)
break; break;
if(n == -1 || write(pfd, buf, n) != n) if(n == -1 || write(pfd, buf, n) != n)