summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>1996-08-18 20:14:40 +0000
committermillert <millert@openbsd.org>1996-08-18 20:14:40 +0000
commit10cef3390f61fe9785127caef23fd4cea76fe236 (patch)
tree65bd888440a3714ee57907df84bb80862a602349 /lib
parentif setuid, no env variables (diff)
downloadwireguard-openbsd-10cef3390f61fe9785127caef23fd4cea76fe236.tar.xz
wireguard-openbsd-10cef3390f61fe9785127caef23fd4cea76fe236.zip
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 */