@pmatilai commented on this pull request.


> @@ -78,16 +84,81 @@ static char *doUncompress(const char *fn)
     return cmd;
 }
 
+/**
+ * Detect if an archive has a single top level entry, and it's a directory.
+ *
+ * @param path path of the archive
+ * @return     1 if archive as only a directory as top level entry,
+ *             0 if it contains multiple top level entries or a single file
+ *             -1 on archive error
+ */
+static int singleRoot(const char *path)
+{
+       struct archive *a;
+       struct archive_entry *entry;
+       int r, ret, rootLen;
+       char *rootName;

Just initialize this to NULL and then you no longer need two different exit 
labels.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2859#pullrequestreview-1836285868
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2859/review/1836285...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to