summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2020-05-26 03:58:20 +0200
committerGravatar Nikias Bassen2020-05-26 03:58:20 +0200
commit66d2bb65c2c5b72bcca9cd6d4eb76a2f029519e2 (patch)
tree28bf05096d37e529a899badeaf50b0383d749cf4
parentea5b54b47acec3bebd3e8ae3fccd66a60ec9ff89 (diff)
downloadlibplist-66d2bb65c2c5b72bcca9cd6d4eb76a2f029519e2.tar.gz
libplist-66d2bb65c2c5b72bcca9cd6d4eb76a2f029519e2.tar.bz2
Make plist_bool_val_is_true() return 0 instead of -1 if node is NULL or not a PLIST_BOOLEAN
-rw-r--r--src/plist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plist.c b/src/plist.c
index 38212d8..27f90b1 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -1189,7 +1189,7 @@ PLIST_API void plist_set_date_val(plist_t node, int32_t sec, int32_t usec)
PLIST_API int plist_bool_val_is_true(plist_t boolnode)
{
if (!PLIST_IS_BOOLEAN(boolnode)) {
- return -1;
+ return 0;
}
uint8_t bv = 0;
plist_get_bool_val(boolnode, &bv);