From caf7ac6e90416c95f67a381835980e3da3570eb0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 20 Oct 1998 09:48:26 +0000 Subject: Add braces to silence gcc warnings. --- utils/parse.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'utils/parse.c') diff --git a/utils/parse.c b/utils/parse.c index 5f82a393..5334dbda 100644 --- a/utils/parse.c +++ b/utils/parse.c @@ -1,6 +1,6 @@ /* Random helpful option parsing functions - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. Written by Miles Bader @@ -149,7 +149,7 @@ parse_numlist (char *arg, that ARG matches no entry , otherwise, an error message is printed and the program exits in this event. If ARG is an ambiguous match, an error message is printed and the program exits. */ -int +int parse_enum (const char *arg, const char *(*choice_fn)(unsigned n), const char *kind, int allow_mismatches, @@ -166,13 +166,15 @@ parse_enum (const char *arg, else { if (strncasecmp (choice, arg, arglen) == 0) - if (partial_match >= 0) - { - argp_error (state, "%s: Ambiguous %s", arg, kind); - return -1; - } - else - partial_match = n; + { + if (partial_match >= 0) + { + argp_error (state, "%s: Ambiguous %s", arg, kind); + return -1; + } + else + partial_match = n; + } n++; } -- cgit v1.2.3