From: Dongkyun Son Date: Fri, 11 Aug 2023 07:22:04 +0000 (+0900) Subject: SVACE: Fix UNREACHABLE_CODE (WGID 543176) X-Git-Tag: accepted/tizen/unified/20230814.121032~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=413cd0af500cf6815f13c40b5f616dc02f130222;p=sdk%2Ftarget%2Fsdbd.git 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 --- 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