diff options
author | Jani Nikula <jani@nikula.org> | 2017-10-01 23:53:21 +0300 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2017-10-04 22:03:52 -0300 |
commit | 288c3660d8798141d86faee30b4394a450dda0ba (patch) | |
tree | 9723450994f7f6986abaa06efde45b9851d5dcb5 | |
parent | 4dc3291199055c076b89267c8bf2bdb366c6e635 (diff) |
cli: reduce indent in keyword argument processing
Reducing indent makes future changes easier. No functional changes.
-rw-r--r-- | command-line-arguments.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/command-line-arguments.c b/command-line-arguments.c index c591dcbe..3fa8d904 100644 --- a/command-line-arguments.c +++ b/command-line-arguments.c @@ -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); |