* [Qemu-devel] [PATCH] hw/9pfs: Fix missing parentheses
@ 2011-10-17 19:20 Stefan Weil
2011-10-18 5:10 ` Aneesh Kumar K.V
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Weil @ 2011-10-17 19:20 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Stefan Weil, Aneesh Kumar K.V
cppcheck report:
hw/9pfs/virtio-9p.c:2385:
style: Boolean result is used in bitwise operation.
Clarify expression with parentheses
hw/9pfs/virtio-9p.c:2531:
style: Boolean result is used in bitwise operation.
Clarify expression with parentheses
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
hw/9pfs/virtio-9p.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
index c01c31a..df0b22a 100644
--- a/hw/9pfs/virtio-9p.c
+++ b/hw/9pfs/virtio-9p.c
@@ -2382,7 +2382,7 @@ static void v9fs_remove(void *opaque)
goto out_nofid;
}
/* if fs driver is not path based, return EOPNOTSUPP */
- if (!pdu->s->ctx.flags & PATHNAME_FSCONTEXT) {
+ if (!(pdu->s->ctx.flags & PATHNAME_FSCONTEXT)) {
err = -EOPNOTSUPP;
goto out_err;
}
@@ -2528,7 +2528,7 @@ static void v9fs_rename(void *opaque)
}
BUG_ON(fidp->fid_type != P9_FID_NONE);
/* if fs driver is not path based, return EOPNOTSUPP */
- if (!pdu->s->ctx.flags & PATHNAME_FSCONTEXT) {
+ if (!(pdu->s->ctx.flags & PATHNAME_FSCONTEXT)) {
err = -EOPNOTSUPP;
goto out;
}
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] hw/9pfs: Fix missing parentheses
2011-10-17 19:20 [Qemu-devel] [PATCH] hw/9pfs: Fix missing parentheses Stefan Weil
@ 2011-10-18 5:10 ` Aneesh Kumar K.V
0 siblings, 0 replies; 2+ messages in thread
From: Aneesh Kumar K.V @ 2011-10-18 5:10 UTC (permalink / raw)
To: Stefan Weil, qemu-devel; +Cc: qemu-trivial
On Mon, 17 Oct 2011 21:20:59 +0200, Stefan Weil <sw@weilnetz.de> wrote:
> cppcheck report:
> hw/9pfs/virtio-9p.c:2385:
> style: Boolean result is used in bitwise operation.
> Clarify expression with parentheses
> hw/9pfs/virtio-9p.c:2531:
> style: Boolean result is used in bitwise operation.
> Clarify expression with parentheses
>
> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> hw/9pfs/virtio-9p.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/9pfs/virtio-9p.c b/hw/9pfs/virtio-9p.c
> index c01c31a..df0b22a 100644
> --- a/hw/9pfs/virtio-9p.c
> +++ b/hw/9pfs/virtio-9p.c
> @@ -2382,7 +2382,7 @@ static void v9fs_remove(void *opaque)
> goto out_nofid;
> }
> /* if fs driver is not path based, return EOPNOTSUPP */
> - if (!pdu->s->ctx.flags & PATHNAME_FSCONTEXT) {
> + if (!(pdu->s->ctx.flags & PATHNAME_FSCONTEXT)) {
> err = -EOPNOTSUPP;
> goto out_err;
> }
> @@ -2528,7 +2528,7 @@ static void v9fs_rename(void *opaque)
> }
> BUG_ON(fidp->fid_type != P9_FID_NONE);
> /* if fs driver is not path based, return EOPNOTSUPP */
> - if (!pdu->s->ctx.flags & PATHNAME_FSCONTEXT) {
> + if (!(pdu->s->ctx.flags & PATHNAME_FSCONTEXT)) {
> err = -EOPNOTSUPP;
> goto out;
> }
This is fixed in the new pull request i sent.
http://article.gmane.org/gmane.comp.emulators.qemu/120990
http://repo.or.cz/w/qemu/v9fs.git/commitdiff/c98f1d4a8bb6f779313043d2490093451cf52065?hp=7cca27dfde6435a7846d88e8a1fa927d0ab99919
-aneesh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-10-18 5:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 19:20 [Qemu-devel] [PATCH] hw/9pfs: Fix missing parentheses Stefan Weil
2011-10-18 5:10 ` Aneesh Kumar K.V
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).