From: Paweł Szewczyk Date: Fri, 1 Mar 2019 11:44:08 +0000 (+0100) Subject: vconf: Clarify documentation for vconf_keylist_lookup() X-Git-Tag: accepted/tizen/unified/20190311.220522~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=227e4cc7d70bb05536c56e9df6f268f5d79b82c7;p=platform%2Fcore%2Fsystem%2Fbuxton2.git vconf: Clarify documentation for vconf_keylist_lookup() The returned value was not described correctly and the example ommited checking if the value was actually obtained. This commit add neccessary check to the example code for this function. Change-Id: I507e297338c4c459c99b0cbf8a0b835d71270887 Signed-off-by: Paweł Szewczyk --- diff --git a/vconf-compat/vconf.h b/vconf-compat/vconf.h index ab9d420..89daa62 100644 --- a/vconf-compat/vconf.h +++ b/vconf-compat/vconf.h @@ -484,7 +484,7 @@ int vconf_keylist_free(keylist_t *keylist); * @param[in] keyname The key to find * @param[out] return_node The pointer of the keynode to set * - * @return The type of the found key that is vconf_t enumeration value + * @return The type of the found key that is vconf_t enumeration value or -1 on error * * @see vconf_set() * @see vconf_get() @@ -515,6 +515,11 @@ int main() return -1; } + if (r == VCONF_TYPE_NONE) { + printf("vconf key not found"); + return -1; + } + nResult = vconf_keynode_get_int(pKeyNode); if(nResult !=KEY_02_INT_VALUE) {