From 66d2bb65c2c5b72bcca9cd6d4eb76a2f029519e2 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Tue, 26 May 2020 03:58:20 +0200 Subject: Make plist_bool_val_is_true() return 0 instead of -1 if node is NULL or not a PLIST_BOOLEAN --- src/plist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.1-32-gdbae