[FFmpeg-cvslog] compat/getopt: add {} to complex ifs
Michael Niedermayer
git at videolan.org
Sun Oct 21 18:08:55 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 21 17:34:14 2012 +0200| [38797dc31b65b7cab911a800dc974ed9d1d6a6cf] | committer: Michael Niedermayer
compat/getopt: add {} to complex ifs
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38797dc31b65b7cab911a800dc974ed9d1d6a6cf
---
compat/getopt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compat/getopt.c b/compat/getopt.c
index 019049f..dd082ea 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);
More information about the ffmpeg-cvslog
mailing list