summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Szewczyk <p.szewczyk@samsung.com>2019-03-01 12:44:08 +0100
committerInkyun Kil <inkyun.kil@samsung.com>2019-03-04 09:21:38 +0900
commit227e4cc7d70bb05536c56e9df6f268f5d79b82c7 (patch)
tree3684341d64aa615a9678f63f79e8b279a0e71a04
parentb612d7d82f17daa5cc3f222a7493580b6529ab39 (diff)
downloadbuxton2-227e4cc7d70bb05536c56e9df6f268f5d79b82c7.tar.gz
buxton2-227e4cc7d70bb05536c56e9df6f268f5d79b82c7.tar.bz2
buxton2-227e4cc7d70bb05536c56e9df6f268f5d79b82c7.zip
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 <p.szewczyk@samsung.com>
-rw-r--r--vconf-compat/vconf.h7
1 files changed, 6 insertions, 1 deletions
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)
{