]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Minor fix to argument parser.
authorTim Kientzle <kientzle@gmail.com>
Sun, 4 Jan 2009 00:55:26 +0000 (19:55 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 4 Jan 2009 00:55:26 +0000 (19:55 -0500)
SVN-Revision: 362

libarchive/test/main.c

index 959e3fdf4cf645e5496b45da00b13b3585166c49..b6a56d251b5aaf7762a2864a4de8985b1357f957 100644 (file)
@@ -996,9 +996,10 @@ int main(int argc, char **argv)
         */
        ++argv; /* Skip program name */
        while (*argv != NULL) {
+               if (**argv != '-')
+                       break;
                p = *argv++;
-               if (*p++ != '-')
-                       usage(progname);
+               ++p; /* Skip '-' */
                while (*p != '\0') {
                        option = *p++;
                        option_arg = NULL;