From 413cd0af500cf6815f13c40b5f616dc02f130222 Mon Sep 17 00:00:00 2001 From: Dongkyun Son Date: Fri, 11 Aug 2023 16:22:04 +0900 Subject: [PATCH] SVACE: Fix UNREACHABLE_CODE (WGID 543176) Redundant comparison rootshell_mode == 1 (0 == 1) is always false https://analysishub.sec.samsung.net/dm/tizen/sb2/main/review#PRJID=1177&WGID=543176 Change-Id: Ie02831e0e1ec5211ad4c2336eb0ee0cd048765f9 Signed-off-by: Dongkyun Son --- src/sdb.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/sdb.c b/src/sdb.c index 7b79f52..255ebc3 100755 --- a/src/sdb.c +++ b/src/sdb.c @@ -1306,10 +1306,7 @@ static void init_drop_privileges() { } int should_drop_privileges() { - if (rootshell_mode == 1) { // if root, then don't drop - return 0; - } - return 1; + return !rootshell_mode; // if root, then don't drop } #include -- 2.34.1