summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-09-24 15:30:59 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-09-24 15:30:59 +0000
commitf73791df3ac9ce3552e6bbea2a931dd614605969 (patch)
treebd4c21f8e903fa5c05790c6c654e1fb2285e043e
parentee083c4ca94121f915c801e6e967b3c073265721 (diff)
- Fix arguments to compare function. Closes #1081
-rw-r--r--libc/misc/search/_lsearch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/misc/search/_lsearch.c b/libc/misc/search/_lsearch.c
index e91ea9441..e446489ed 100644
--- a/libc/misc/search/_lsearch.c
+++ b/libc/misc/search/_lsearch.c
@@ -22,7 +22,7 @@ void *lfind(const void *key, const void *base, size_t *nmemb,
register int n = *nmemb;
while (n--) {
- if ((*compar) (base, key) == 0)
+ if ((*compar) (key, base) == 0)
return ((void*)base);
base += size;
}