Just ignore miFreeHeader() return on rpmdbNextIterator() too
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 21 Apr 2011 07:13:45 +0000 (10:13 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 21 Apr 2011 07:44:09 +0000 (10:44 +0300)
- There's no meaningful way to return a write-error here,
  rpmdbNextIterator() caller wouldn't know whether NULL at termination
  is early due to error or not. So just ignore the return from
  miFreeHeader(), it can only fail on rewrite mode (ie markReplacedFiles())
  so impact is rather limited anyway.

lib/rpmdb.c

index 04a5a0a..096fb3d 100644 (file)
@@ -1679,7 +1679,6 @@ Header rpmdbNextIterator(rpmdbMatchIterator mi)
     void * keyp;
     size_t keylen;
     int rc;
-    int xx;
 
     if (mi == NULL)
        return NULL;
@@ -1779,7 +1778,7 @@ top:
     }
 
     /* Rewrite current header (if necessary) and unlink. */
-    xx = miFreeHeader(mi, dbi);
+    miFreeHeader(mi, dbi);
 
     /* Is this the end of the iteration? */
     if (uh == NULL)