]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: remove unnecessary condition [lgtm scan]
authorKarel Zak <kzak@redhat.com>
Fri, 20 Sep 2019 13:52:34 +0000 (15:52 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 20 Sep 2019 13:52:34 +0000 (15:52 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/probe.c

index ae1fc06d6ac8935b690c30eee8c6161a083fdd7c..790168c16cbe248154150e89627296a5899f14fe 100644 (file)
@@ -217,8 +217,7 @@ blkid_probe blkid_new_probe_from_filename(const char *filename)
        pr->flags |= BLKID_FL_PRIVATE_FD;
        return pr;
 err:
-       if (fd >= 0)
-               close(fd);
+       close(fd);
        blkid_free_probe(pr);
        return NULL;
 }