From 46a53704ada9b277ade7d97eccf784f89bb7926e Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 10 May 2017 13:50:18 +1200 Subject: [PATCH] Small fix: arguments passed in wrong order. --- common/list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/list.c b/common/list.c index 41bbb7eb1..3d83faab4 100644 --- a/common/list.c +++ b/common/list.c @@ -191,7 +191,7 @@ ssize_t list_lsearch(const list_t *list, int compare(const void *key, const void uint8_t (*array)[size] = list->items; for (size_t i = 0; i < list->length; ++i) { - if (compare(&array[i], key) == 0) { + if (compare(key, &array[i]) == 0) { if (ret) { memcpy(ret, &array[i], size); }