summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-08-18 20:14:41 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-08-18 20:14:41 +0000
commit2bd315da6449ea0d5a3f8f2758dff489d30b01b4 (patch)
tree56f79ededa9d061435c2b52020b27499a14f3b30 /lib
parent5ccde282dd76a373893304c6c650e3a68ec912ca (diff)
Fix order of parameters to compare function. Man page says (key, element)
which is what the ATT version does too.
Diffstat (limited to 'lib')
-rw-r--r--lib/libcompat/4.3/lsearch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libcompat/4.3/lsearch.c b/lib/libcompat/4.3/lsearch.c
index 9a21afee154..da3d9731eaf 100644
--- a/lib/libcompat/4.3/lsearch.c
+++ b/lib/libcompat/4.3/lsearch.c
@@ -75,7 +75,7 @@ linear_base(key, base, nelp, width, compar, add_flag)
end = (const char *)base + *nelp * width;
for (element = base; element < end; element += width)
- if (!compar(element, key)) /* key found */
+ if (!compar(key, element)) /* key found */
return((void *)element);
if (!add_flag) /* key not found */