From 27c37cb3f39578b473a0684e6e55bf23d1910903 Mon Sep 17 00:00:00 2001 From: Jari Matilainen Date: Sun, 13 Mar 2016 22:04:59 +0100 Subject: Return -1 from null-test to comply with the rest of strarray_find --- src/core/misc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/misc.c b/src/core/misc.c index aaa470f5..c26610ec 100644 --- a/src/core/misc.c +++ b/src/core/misc.c @@ -169,8 +169,8 @@ int strarray_find(char **array, const char *item) char **tmp; int index; - g_return_val_if_fail(array != NULL, 0); - g_return_val_if_fail(item != NULL, 0); + g_return_val_if_fail(array != NULL, -1); + g_return_val_if_fail(item != NULL, -1); index = 0; for (tmp = array; *tmp != NULL; tmp++, index++) { -- cgit v1.2.3