diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-08-18 20:14:41 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-08-18 20:14:41 +0000 |
commit | 2bd315da6449ea0d5a3f8f2758dff489d30b01b4 (patch) | |
tree | 56f79ededa9d061435c2b52020b27499a14f3b30 /lib/libcompat | |
parent | 5ccde282dd76a373893304c6c650e3a68ec912ca (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/libcompat')
-rw-r--r-- | lib/libcompat/4.3/lsearch.c | 2 |
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 */ |