Remove redundant NULL checks
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 19 May 2011 08:08:07 +0000 (11:08 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 19 May 2011 08:08:07 +0000 (11:08 +0300)
- Fclose() handles NULL by itself, no need to check in callers.
  Also no need to NULL'ify the local variables here.

build/pack.c

index 9d4f404..5a0e844 100644 (file)
@@ -499,14 +499,9 @@ exit:
     }
 
     sig = rpmFreeSignature(sig);
-    if (ifd) {
-       (void) Fclose(ifd);
-       ifd = NULL;
-    }
-    if (fd) {
-       (void) Fclose(fd);
-       fd = NULL;
-    }
+    Fclose(ifd);
+    Fclose(fd);
+
     if (sigtarget) {
        (void) unlink(sigtarget);
        sigtarget = _free(sigtarget);