diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-11 16:02:03 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2018-08-24 16:47:08 +0200 |
commit | d9537fde9944a03f48054e0f4b6a9aea7d3c2a9d (patch) | |
tree | 1f4d52653dea6867cba74e3c950d251646581822 /src/basic/verbs.c | |
parent | 5794614c99bdb57a405f293923bf17f24dad25e9 (diff) |
tree-wide: drop !! casts to booleans
They are not needed, because anything that is non-zero is converted
to true.
C11:
> 6.3.1.2: When any scalar value is converted to _Bool, the result is 0 if the
> value compares equal to 0; otherwise, the result is 1.
https://stackoverflow.com/questions/31551888/casting-int-to-bool-in-c-c
Diffstat (limited to 'src/basic/verbs.c')
-rw-r--r-- | src/basic/verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/verbs.c b/src/basic/verbs.c index 743aed5e4..a52cd2ad9 100644 --- a/src/basic/verbs.c +++ b/src/basic/verbs.c @@ -81,7 +81,7 @@ int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) { if (name) found = streq(name, verbs[i].verb); else - found = !!(verbs[i].flags & VERB_DEFAULT); + found = verbs[i].flags & VERB_DEFAULT; if (found) { verb = &verbs[i]; |