From 1ec9dc97ccf0119fe04b6a63041a3de8d41af0e9 Mon Sep 17 00:00:00 2001 From: Jae-young Hwang Date: Tue, 22 Oct 2013 22:25:41 +0900 Subject: [PATCH] bug fix : prevent issue CID 13716 solve the dead error condition Change-Id: I025328bc0cace1fe20b449cbda6e8f5e36f3920e Signed-off-by: Jae-young Hwang --- logutil.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/logutil.c b/logutil.c index 1c1355d..a66c4b4 100755 --- a/logutil.c +++ b/logutil.c @@ -678,9 +678,7 @@ int main(int argc, char **argv) } g_dev_count = 1; - int accessmode = - (mode == O_RDONLY) ? R_OK : 0 - | (mode == O_WRONLY) ? W_OK : 0; + int accessmode = (mode == O_RDONLY) ? R_OK : (mode == O_WRONLY) ? W_OK : 0; // only add this if it's available if (0 == access("/dev/"LOGGER_LOG_SYSTEM, accessmode)) { -- 2.7.4