diff options
| author | 2020-05-26 03:58:20 +0200 | |
|---|---|---|
| committer | 2020-05-26 03:58:20 +0200 | |
| commit | 66d2bb65c2c5b72bcca9cd6d4eb76a2f029519e2 (patch) | |
| tree | 28bf05096d37e529a899badeaf50b0383d749cf4 | |
| 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
| -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) | |||
| 1189 | PLIST_API int plist_bool_val_is_true(plist_t boolnode) | 1189 | PLIST_API int plist_bool_val_is_true(plist_t boolnode) |
| 1190 | { | 1190 | { |
| 1191 | if (!PLIST_IS_BOOLEAN(boolnode)) { | 1191 | if (!PLIST_IS_BOOLEAN(boolnode)) { |
| 1192 | return -1; | 1192 | return 0; |
| 1193 | } | 1193 | } |
| 1194 | uint8_t bv = 0; | 1194 | uint8_t bv = 0; |
| 1195 | plist_get_bool_val(boolnode, &bv); | 1195 | plist_get_bool_val(boolnode, &bv); |
