From: Jae-young Hwang Date: Tue, 22 Oct 2013 13:25:41 +0000 (+0900) Subject: bug fix : prevent issue CID 13716 X-Git-Tag: 2.2.1_release X-Git-Url: http://review.tizen.org/git/?p=framework%2Fsystem%2Fdlog.git;a=commitdiff_plain;h=refs%2Ftags%2F2.2.1_release bug fix : prevent issue CID 13716 solve the dead error condition Change-Id: I025328bc0cace1fe20b449cbda6e8f5e36f3920e Signed-off-by: Jae-young Hwang --- 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)) {