diff options
author | Sami Kerola | 2016-07-03 13:42:58 +0200 |
---|---|---|
committer | Sami Kerola | 2016-07-21 22:14:33 +0200 |
commit | 7d55b2df2e29845ce4d096676507772c230fcea3 (patch) | |
tree | 2455c8ce19a836d3dc54d203d28b9ac233296e2f /sys-utils/setpriv.c | |
parent | logger: simplify if clause [oclint] (diff) | |
download | kernel-qcow2-util-linux-7d55b2df2e29845ce4d096676507772c230fcea3.tar.gz kernel-qcow2-util-linux-7d55b2df2e29845ce4d096676507772c230fcea3.tar.xz kernel-qcow2-util-linux-7d55b2df2e29845ce4d096676507772c230fcea3.zip |
syspriv: flip inverted logic [oclint]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/setpriv.c')
-rw-r--r-- | sys-utils/setpriv.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c index 3b99a177e..977ccd14a 100644 --- a/sys-utils/setpriv.c +++ b/sys-utils/setpriv.c @@ -175,10 +175,10 @@ static int print_caps(FILE *f, capng_type_t which) static void dump_one_secbit(int *first, int *bits, int bit, const char *name) { if (*bits & bit) { - if (!*first) - printf(","); - else + if (*first) *first = 0; + else + printf(","); fputs(name, stdout); *bits &= ~bit; } @@ -206,10 +206,10 @@ static void dump_securebits(void) dump_one_secbit(&first, &bits, SECBIT_KEEP_CAPS_LOCKED, "keep_caps_locked"); if (bits) { - if (!first) - printf(","); - else + if (first) first = 0; + else + printf(","); printf("0x%x", (unsigned)bits); } |