]> git.ipfire.org Git - thirdparty/git.git/blobdiff - upload-pack.c
short i/o: fix calls to read to use xread or read_in_full
[thirdparty/git.git] / upload-pack.c
index d4a7b625f47d4b92a85f9efc0686f5dc3910bb6d..03a4156e19655c1f1d724163d0a712f63fc72c6e 100644 (file)
@@ -1,6 +1,3 @@
-#include <signal.h>
-#include <sys/wait.h>
-#include <sys/poll.h>
 #include "cache.h"
 #include "refs.h"
 #include "pkt-line.h"
@@ -245,7 +242,7 @@ static void create_pack_file(void)
                                        *cp++ = buffered;
                                        outsz++;
                                }
-                               sz = read(pu_pipe[0], cp,
+                               sz = xread(pu_pipe[0], cp,
                                          sizeof(data) - outsz);
                                if (0 < sz)
                                                ;
@@ -270,7 +267,7 @@ static void create_pack_file(void)
                                /* Status ready; we ship that in the side-band
                                 * or dump to the standard error.
                                 */
-                               sz = read(pe_pipe[0], progress,
+                               sz = xread(pe_pipe[0], progress,
                                          sizeof(progress));
                                if (0 < sz)
                                        send_client_data(2, progress, sz);