From: Karel Zak Date: Tue, 14 Jun 2016 11:55:27 +0000 (+0200) Subject: libmount: don't check nonnull attributes for NULL [-Wnonnull-compare] X-Git-Tag: v2.29-rc1~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=372d410d9e2ffd300cc7e264646c6cdd70e022a6;p=thirdparty%2Futil-linux.git libmount: don't check nonnull attributes for NULL [-Wnonnull-compare] Signed-off-by: Karel Zak --- diff --git a/libmount/src/context.c b/libmount/src/context.c index c53a639547..87ccccfc6e 100644 --- a/libmount/src/context.c +++ b/libmount/src/context.c @@ -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; } /** diff --git a/libmount/src/context_loopdev.c b/libmount/src/context_loopdev.c index 97435619e0..836ebc1d38 100644 --- a/libmount/src/context_loopdev.c +++ b/libmount/src/context_loopdev.c @@ -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",