Przeglądaj źródła

dpkg: Use fd_skip() instead of fd_read() on tarobject_skip_padding()

Guillem Jover 14 lat temu
rodzic
commit
3633c757db
1 zmienionych plików z 2 dodań i 3 usunięć
  1. 2 3
      src/archives.c

+ 2 - 3
src/archives.c

@@ -186,12 +186,11 @@ static void
 tarobject_skip_padding(struct tarcontext *tc, struct tar_entry *te)
 {
   size_t r;
-  char databuf[TARBLKSZ];
 
   r = te->size % TARBLKSZ;
   if (r > 0)
-    if (fd_read(tc->backendpipe, databuf, TARBLKSZ - r) < 0)
-      ohshite(_("error reading from dpkg-deb pipe"));
+    fd_skip(tc->backendpipe, TARBLKSZ - r,
+            _("error reading from dpkg-deb pipe"));
 }
 
 static void