Merge pull request #440 from vague666/strarray_find_bugfix

Return -1 from null-test to comply with the rest of strarray_find
This commit is contained in:
Giuseppe 2016-03-14 22:37:05 +01:00
commit 6aa33c4aae

View file

@ -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++) {