From 7ed324d7df6f3d0d549bfb08a820395491d2e67a Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 3 Dec 2018 12:51:12 +0900 Subject: [PATCH] Fix printing error log about checking key existence 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 --- src/preference.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/preference.c b/src/preference.c index 46117d3..2cf02ca 100644 --- a/src/preference.c +++ b/src/preference.c @@ -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; -- 2.34.1