fixed qsort() and bsearch() sizes for the provides table
authorroot <devnull@localhost>
Fri, 12 Jul 1996 01:36:29 +0000 (01:36 +0000)
committerroot <devnull@localhost>
Fri, 12 Jul 1996 01:36:29 +0000 (01:36 +0000)
CVS patchset: 793
CVS date: 1996/07/12 01:36:29

lib/depends.c

index d610a4f..5d5f1c4 100644 (file)
@@ -203,8 +203,8 @@ int rpmdepCheck(rpmDependencies rpmdep,
        }
     }
 
-    qsort(rpmdep->providesTable, rpmdep->numProvides, sizeof(char *), 
-         (void *) providescmp);
+    qsort(rpmdep->providesTable, rpmdep->numProvides, 
+         sizeof(*rpmdep->providesTable), (void *) providescmp);
     
     /* look at all of the added packages and make sure their dependencies
        are satisfied */
@@ -266,7 +266,7 @@ static int unsatisfiedDepend(rpmDependencies rpmdep, char * reqName,
 
     prent.entry = reqName;
     if ((provider = bsearch(&prent, rpmdep->providesTable, rpmdep->numProvides,
-               sizeof(char *), (void *) providescmp))) {
+               sizeof(*rpmdep->providesTable), (void *) providescmp))) {
        if (headerMatchesDepFlags(provider->package->h, reqVersion, reqFlags))
            return 0;
     }