cli: reduce indent in keyword argument processing
authorJani Nikula <jani@nikula.org>
Sun, 1 Oct 2017 20:53:21 +0000 (23:53 +0300)
committerDavid Bremner <david@tethera.net>
Thu, 5 Oct 2017 01:03:52 +0000 (22:03 -0300)
Reducing indent makes future changes easier. No functional changes.

command-line-arguments.c

index c591dcbec7cc3e7f92b4043828b2a950f1215737..3fa8d9044966973cc0a53ba8249e431577fc69fb 100644 (file)
@@ -21,13 +21,15 @@ _process_keyword_arg (const notmuch_opt_desc_t *arg_desc, char next, const char
     }
 
     for (keywords = arg_desc->keywords; keywords->name; keywords++) {
-       if (strcmp (arg_str, keywords->name) == 0) {
-           if (arg_desc->opt_flags)
-               *arg_desc->opt_flags |= keywords->value;
-           else
-               *arg_desc->opt_keyword = keywords->value;
-           return TRUE;
-       }
+       if (strcmp (arg_str, keywords->name) != 0)
+           continue;
+
+       if (arg_desc->opt_flags)
+           *arg_desc->opt_flags |= keywords->value;
+       else
+           *arg_desc->opt_keyword = keywords->value;
+
+       return TRUE;
     }
     if (next != '\0')
        fprintf (stderr, "Unknown keyword argument \"%s\" for option \"%s\".\n", arg_str, arg_desc->name);