Eliminate dead NULL-assignments at scope-end in librpm, part IV
authorPanu Matilainen <pmatilai@redhat.com>
Sat, 28 May 2011 19:28:53 +0000 (22:28 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Sat, 28 May 2011 19:28:53 +0000 (22:28 +0300)
- Remove NULL-assignments of local variables at the end of scope
  in the higher level package-related "objects": rpmds, rpmfi, rpmte

lib/rpmds.c
lib/rpmfi.c
lib/rpmte.c

index 3dff6cb..a62bb8d 100644 (file)
@@ -784,7 +784,7 @@ int rpmdsMatchesDep (const Header h, int ix, const rpmds req, int nopromote)
     rpmdsSetIx(provides,ix);
     result = rpmdsCompare(provides, req);
 
-    provides = rpmdsFree(provides);
+    rpmdsFree(provides);
     return result;
 }
 
@@ -810,7 +810,7 @@ int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote)
     }
 
 exit:
-    provides = rpmdsFree(provides);
+    rpmdsFree(provides);
 
     return result;
 }
@@ -909,7 +909,7 @@ int rpmdsRpmlib(rpmds * dsp, const void * tblp)
        rpmds ds = rpmdsSingle(RPMTAG_PROVIDENAME, rlp->featureName,
                        rlp->featureEVR, rlp->featureFlags);
        rc = rpmdsMerge(dsp, ds);
-       ds = rpmdsFree(ds);
+       rpmdsFree(ds);
     }
     return rc;
 }
index 5a34d75..e1e8fa9 100644 (file)
@@ -783,7 +783,7 @@ static int addPrefixes(Header h, rpmRelocation *relocations, int numRelocations)
     if (numActual) {
        headerPutStringArray(h, RPMTAG_INSTPREFIXES, actualRelocations, numActual);
     }
-    actualRelocations = _free(actualRelocations);
+    free(actualRelocations);
     return numActual;
 }
 
index d13575a..448a35a 100644 (file)
@@ -627,7 +627,7 @@ static Header rpmteDBHeader(rpmte te)
     /* iterator returns weak refs, grab hold of header */
     if ((h = rpmdbNextIterator(mi)))
        h = headerLink(h);
-    mi = rpmdbFreeIterator(mi);
+    rpmdbFreeIterator(mi);
     return h;
 }