]> git.sesse.net Git - ffmpeg/blobdiff - compat/getopt.c
Merge commit '4521645b1aee9e9ad8f5cea7b2392cd5f6ffcd26'
[ffmpeg] / compat / getopt.c
index 019049f8c0ddc2c2c725128f913ed4661a1a563d..dd082ea2e684cb56d9f0dfc0741a27a8288e6ea1 100644 (file)
@@ -46,7 +46,7 @@ static int getopt(int argc, char *argv[], char *opts)
     int c;
     char *cp;
 
-    if (sp == 1)
+    if (sp == 1) {
         if (optind >= argc ||
             argv[optind][0] != '-' || argv[optind][1] == '\0')
             return EOF;
@@ -54,6 +54,7 @@ static int getopt(int argc, char *argv[], char *opts)
             optind++;
             return EOF;
         }
+    }
     optopt = c = argv[optind][sp];
     if (c == ':' || (cp = strchr(opts, c)) == NULL) {
         fprintf(stderr, ": illegal option -- %c\n", c);