diff options
author | Francesco Cosoleto | 2011-09-15 16:17:45 +0200 |
---|---|---|
committer | Karel Zak | 2011-09-27 15:04:18 +0200 |
commit | 82b4082e8012dab2fba079de991a2d0c8fc12a38 (patch) | |
tree | 2ed0b988c77f7c4bbcf5190ac92466bd141f8957 /lib/loopdev.c | |
parent | flock: make flock(1) work on NFSv4 (diff) | |
download | kernel-qcow2-util-linux-82b4082e8012dab2fba079de991a2d0c8fc12a38.tar.gz kernel-qcow2-util-linux-82b4082e8012dab2fba079de991a2d0c8fc12a38.tar.xz kernel-qcow2-util-linux-82b4082e8012dab2fba079de991a2d0c8fc12a38.zip |
lib,loopdev: fix use of logical '&&' with constant operand
Found by clang.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Diffstat (limited to 'lib/loopdev.c')
-rw-r--r-- | lib/loopdev.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/loopdev.c b/lib/loopdev.c index de227e226..5a60b106b 100644 --- a/lib/loopdev.c +++ b/lib/loopdev.c @@ -116,7 +116,7 @@ int loopcxt_init(struct loopdev_cxt *lc, int flags) lc->flags = flags; loopcxt_set_device(lc, NULL); - if (!(lc->flags && LOOPDEV_FL_NOSYSFS) && + if (!(lc->flags & LOOPDEV_FL_NOSYSFS) && get_linux_version() >= KERNEL_VERSION(2,6,37)) /* * Use only sysfs for basic information about loop devices @@ -244,7 +244,7 @@ int loopcxt_init_iterator(struct loopdev_cxt *lc, int flags) /* * Check for /dev/loop/<N> subdirectory */ - if (!(lc->flags && LOOPDEV_FL_DEVSUBDIR) && + if (!(lc->flags & LOOPDEV_FL_DEVSUBDIR) && stat(_PATH_DEV_LOOP, &st) == 0 && S_ISDIR(st.st_mode)) lc->flags |= LOOPDEV_FL_DEVSUBDIR; |