diff options
| author | David Bremner <david@tethera.net> | 2019-06-12 19:47:20 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2019-06-14 07:41:27 -0300 |
| commit | be8f0ba92a302798b21cf02ef73c4ad783b66cba (patch) | |
| tree | 11a5ce8338b35f9e4f489ac14cf64a9b5b5d2b83 /command-line-arguments.c | |
| parent | bcfd3e7542b3a004caba16b723c6663c7fd4b015 (diff) | |
CLI: replace some constructs with more uncrustify friendly ones
In particular
- use (bool) instead of !!
- cuddle the opening parens of function calls
- add parens in some ternery operators
Diffstat (limited to 'command-line-arguments.c')
| -rw-r--r-- | command-line-arguments.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/command-line-arguments.c b/command-line-arguments.c index d64aa85b..6699c521 100644 --- a/command-line-arguments.c +++ b/command-line-arguments.c @@ -78,7 +78,7 @@ _process_boolean_arg (const notmuch_opt_desc_t *arg_desc, char next, return OPT_FAILED; } - *arg_desc->opt_bool = negate ? !value : value; + *arg_desc->opt_bool = negate ? (! value) : value; return OPT_OK; } @@ -120,13 +120,13 @@ _process_string_arg (const notmuch_opt_desc_t *arg_desc, char next, const char * static int _opt_set_count (const notmuch_opt_desc_t *opt_desc) { return - !!opt_desc->opt_inherit + - !!opt_desc->opt_bool + - !!opt_desc->opt_int + - !!opt_desc->opt_keyword + - !!opt_desc->opt_flags + - !!opt_desc->opt_string + - !!opt_desc->opt_position; + (bool) opt_desc->opt_inherit + + (bool) opt_desc->opt_bool + + (bool) opt_desc->opt_int + + (bool) opt_desc->opt_keyword + + (bool) opt_desc->opt_flags + + (bool) opt_desc->opt_string + + (bool) opt_desc->opt_position; } /* Return true if opt_desc is valid. */ |
