* [PATCH 1/2] lib: [loopdev.c] fix use of logical '&&' with constant operand
@ 2011-09-15 14:17 Francesco Cosoleto
2011-09-15 14:17 ` [PATCH 2/2] libmount: " Francesco Cosoleto
2011-09-27 13:07 ` [PATCH 1/2] lib: [loopdev.c] " Karel Zak
0 siblings, 2 replies; 4+ messages in thread
From: Francesco Cosoleto @ 2011-09-15 14:17 UTC (permalink / raw)
To: util-linux; +Cc: Francesco Cosoleto
Found by clang.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
---
lib/loopdev.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/loopdev.c b/lib/loopdev.c
index 81b7d2d..7c095ee 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;
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] libmount: fix use of logical '&&' with constant operand
2011-09-15 14:17 [PATCH 1/2] lib: [loopdev.c] fix use of logical '&&' with constant operand Francesco Cosoleto
@ 2011-09-15 14:17 ` Francesco Cosoleto
2011-09-27 13:07 ` Karel Zak
2011-09-27 13:07 ` [PATCH 1/2] lib: [loopdev.c] " Karel Zak
1 sibling, 1 reply; 4+ messages in thread
From: Francesco Cosoleto @ 2011-09-15 14:17 UTC (permalink / raw)
To: util-linux; +Cc: Francesco Cosoleto
Found by clang.
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
---
libmount/src/context_loopdev.c | 2 +-
libmount/src/context_mount.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmount/src/context_loopdev.c b/libmount/src/context_loopdev.c
index 6ed0df1..992472e 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 7e75ad7..bcc4cdd 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 */
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] lib: [loopdev.c] fix use of logical '&&' with constant operand
2011-09-15 14:17 [PATCH 1/2] lib: [loopdev.c] fix use of logical '&&' with constant operand Francesco Cosoleto
2011-09-15 14:17 ` [PATCH 2/2] libmount: " Francesco Cosoleto
@ 2011-09-27 13:07 ` Karel Zak
1 sibling, 0 replies; 4+ messages in thread
From: Karel Zak @ 2011-09-27 13:07 UTC (permalink / raw)
To: Francesco Cosoleto; +Cc: util-linux
On Thu, Sep 15, 2011 at 04:17:45PM +0200, Francesco Cosoleto wrote:
> lib/loopdev.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] libmount: fix use of logical '&&' with constant operand
2011-09-15 14:17 ` [PATCH 2/2] libmount: " Francesco Cosoleto
@ 2011-09-27 13:07 ` Karel Zak
0 siblings, 0 replies; 4+ messages in thread
From: Karel Zak @ 2011-09-27 13:07 UTC (permalink / raw)
To: Francesco Cosoleto; +Cc: util-linux
On Thu, Sep 15, 2011 at 04:17:46PM +0200, Francesco Cosoleto wrote:
> libmount/src/context_loopdev.c | 2 +-
> libmount/src/context_mount.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-09-27 13:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-15 14:17 [PATCH 1/2] lib: [loopdev.c] fix use of logical '&&' with constant operand Francesco Cosoleto
2011-09-15 14:17 ` [PATCH 2/2] libmount: " Francesco Cosoleto
2011-09-27 13:07 ` Karel Zak
2011-09-27 13:07 ` [PATCH 1/2] lib: [loopdev.c] " Karel Zak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.