[PATCH 07/13] syspriv: flip inverted logic [oclint]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 sys-utils/setpriv.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys-utils/setpriv.c b/sys-utils/setpriv.c
index 3b99a17..977ccd1 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);
 	}
 
-- 
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux