]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libmount: don't check nonnull attributes for NULL [-Wnonnull-compare]
authorKarel Zak <kzak@redhat.com>
Tue, 14 Jun 2016 11:55:27 +0000 (13:55 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jun 2016 11:55:27 +0000 (13:55 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/context.c
libmount/src/context_loopdev.c

index c53a639547409caaa8309d2ee46d2e2aa33fa9e2..87ccccfc6e3d7149a14e34b31995cdde33cb3112 100644 (file)
@@ -369,7 +369,7 @@ int mnt_context_disable_canonicalize(struct libmnt_context *cxt, int disable)
  */
 int mnt_context_is_nocanonicalize(struct libmnt_context *cxt)
 {
-       return cxt && (cxt->flags & MNT_FL_NOCANONICALIZE) ? 1 : 0;
+       return cxt->flags & MNT_FL_NOCANONICALIZE ? 1 : 0;
 }
 
 /**
index 97435619e06e73645a4452c55a906da87a23d050..836ebc1d3884e890f1f360679107484d5bfb4c9d 100644 (file)
@@ -93,7 +93,7 @@ is_mounted_same_loopfile(struct libmnt_context *cxt,
        assert(cxt->fs);
        assert((cxt->flags & MNT_FL_MOUNTFLAGS_MERGED));
 
-       if (!target || !backing_file || mnt_context_get_mtab(cxt, &tb))
+       if (mnt_context_get_mtab(cxt, &tb))
                return 0;
 
        DBG(LOOP, ul_debugobj(cxt, "checking if %s mounted on %s",