diff options
author | Nikias Bassen | 2020-05-26 03:58:20 +0200 |
---|---|---|
committer | Nikias Bassen | 2020-05-26 03:58:20 +0200 |
commit | 66d2bb65c2c5b72bcca9cd6d4eb76a2f029519e2 (patch) | |
tree | 28bf05096d37e529a899badeaf50b0383d749cf4 /src/plist.c | |
parent | ea5b54b47acec3bebd3e8ae3fccd66a60ec9ff89 (diff) | |
download | libplist-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
Diffstat (limited to 'src/plist.c')
-rw-r--r-- | src/plist.c | 2 |
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); |