From: Michael Niedermayer Date: Sun, 21 Oct 2012 15:34:14 +0000 (+0200) Subject: compat/getopt: add {} to complex ifs X-Git-Tag: android-x86-4.4-r1~8660 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=38797dc31b65b7cab911a800dc974ed9d1d6a6cf;p=android-x86%2Fexternal-ffmpeg.git compat/getopt: add {} to complex ifs Signed-off-by: Michael Niedermayer --- diff --git a/compat/getopt.c b/compat/getopt.c index 019049f8c0..dd082ea2e6 100644 --- a/compat/getopt.c +++ b/compat/getopt.c @@ -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);