Fix printing error log about checking key existence 11/194311/2
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 3 Dec 2018 03:51:12 +0000 (12:51 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 3 Dec 2018 04:09:52 +0000 (13:09 +0900)
Printing "key doesn't exit" is not needed. Because, the purpose of the
function is checking whether the key exists or not.

Change-Id: I229c5878daa7f526a6372b6606046788778ef2bf
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/preference.c

index 46117d3171dd46ac901011c373ee4a3336c2dde1..2cf02cad679d68e43f23888232753e57cc21870b 100644 (file)
@@ -1431,7 +1431,10 @@ int preference_is_existing(const char *key, bool *exist)
 
        ret = access(path, F_OK);
        if (ret == -1) {
-               ERR("Error : key(%s) is not exist", key);
+               if (errno != ENOENT) {
+                       ERR("Failed to access key(%s) node. errno(%d)",
+                                       key, errno);
+               }
                *exist = 0;
        } else {
                *exist = 1;