]> granicus.if.org Git - sudo/commitdiff
in compar() key should be first arg
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 17 Aug 1996 17:15:37 +0000 (17:15 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sat, 17 Aug 1996 17:15:37 +0000 (17:15 +0000)
lsearch.c

index 8e2a664e4794514987160fb06f657c062a683616..00392147e1ccdcab43db7e801beea63cf8ac8096 100644 (file)
--- a/lsearch.c
+++ b/lsearch.c
@@ -84,7 +84,7 @@ linear_base(key, base, nelp, width, compar, add_flag)
 
        end = (const char *) base + *nelp * width;
        for (element = (const char *) base; element < end; element += width)
-               if (!compar((VOID *) element, key))     /* key found */
+               if (!compar(key, (VOID *) element))     /* key found */
                        return((VOID *) element);
        if (!add_flag)                                  /* key not found */
                return(NULL);