Ignore rpmdbClose() return on failed rpmdbOpen()
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 18 Apr 2011 09:00:44 +0000 (12:00 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 18 Apr 2011 09:00:44 +0000 (12:00 +0300)
- We can't do anything about it so just ignore and remove the
  unused variable

lib/rpmdb.c

index 7008c41..b7603d6 100644 (file)
@@ -715,7 +715,7 @@ static int openDatabase(const char * prefix,
                int mode, int perms, int flags)
 {
     rpmdb db;
-    int rc, xx;
+    int rc;
     int justCheck = flags & RPMDB_FLAG_JUSTCHECK;
 
     if (dbp)
@@ -743,7 +743,7 @@ static int openDatabase(const char * prefix,
     }
 
     if (rc || justCheck || dbp == NULL)
-       xx = rpmdbClose(db);
+       rpmdbClose(db);
     else {
        db->db_next = rpmdbRock;
        rpmdbRock = db;