s3-clitar: Improve readabilty of tar_extract().
authorAndreas Schneider <asn@samba.org>
Mon, 17 Feb 2014 10:03:53 +0000 (11:03 +0100)
committerAndreas Schneider <asn@samba.org>
Wed, 19 Feb 2014 17:22:30 +0000 (18:22 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
source3/client/clitar.c

index cf4260ecd3a4261c5664c5321a9d67947b6a36dd..ac69920e0ac8de698ab931302186b6301034b56a 100644 (file)
@@ -1015,6 +1015,7 @@ static int tar_extract(struct tar *t)
     int r;
     struct archive_entry *entry;
     const size_t bsize = t->mode.blocksize * TAR_BLOCK_UNIT;
+    int rc;
 
     t->archive = archive_read_new();
     archive_read_support_format_all(t->archive);
@@ -1047,14 +1048,16 @@ static int tar_extract(struct tar *t)
             goto out;
         }
 
-        if (tar_extract_skip_path(t, entry)) {
+        rc = tar_extract_skip_path(t, entry);
+        if (rc != 0) {
             DBG(5, ("--- %s\n", archive_entry_pathname(entry)));
             continue;
         }
 
         DBG(5, ("+++ %s\n", archive_entry_pathname(entry)));
 
-        if (tar_send_file(t, entry)) {
+        rc = tar_send_file(t, entry);
+        if (rc != 0) {
             err = 1;
             goto out;
         }