From: Francesco Cosoleto Date: Thu, 15 Sep 2011 14:17:46 +0000 (+0200) Subject: libmount: fix use of logical '&&' with constant operand X-Git-Tag: v2.21-rc1~386 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a03fd94b57abaa9211300088c454c0cb65a36786;p=thirdparty%2Futil-linux.git libmount: fix use of logical '&&' with constant operand Found by clang. Signed-off-by: Francesco Cosoleto --- diff --git a/libmount/src/context_loopdev.c b/libmount/src/context_loopdev.c index 6ed0df13e4..992472e3d8 100644 --- a/libmount/src/context_loopdev.c +++ b/libmount/src/context_loopdev.c @@ -52,7 +52,7 @@ int mnt_context_is_loopdev(struct libmnt_context *cxt) type = mnt_fs_get_fstype(cxt->fs); fl = __mnt_fs_get_flags(cxt->fs); - if (!(fl && (MNT_FS_PSEUDO | MNT_FS_NET | MNT_FS_SWAP)) && + if (!(fl & (MNT_FS_PSEUDO | MNT_FS_NET | MNT_FS_SWAP)) && (!type || strcmp(type, "auto") == 0 || blkid_known_fstype(type))) { struct stat st; diff --git a/libmount/src/context_mount.c b/libmount/src/context_mount.c index 7e75ad7363..bcc4cdd120 100644 --- a/libmount/src/context_mount.c +++ b/libmount/src/context_mount.c @@ -125,7 +125,7 @@ static int fix_optstr(struct libmnt_context *cxt) goto done; } - if (!rc && cxt->user_mountflags && MNT_MS_USER) + if (!rc && cxt->user_mountflags & MNT_MS_USER) rc = mnt_optstr_fix_user(&fs->user_optstr); /* refresh merged optstr */