[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 27/31] nbd-client: Use correct macro parenthesizati
From: |
Michael Tokarev |
Subject: |
[Qemu-trivial] [PULL 27/31] nbd-client: Use correct macro parenthesization |
Date: |
Mon, 25 Sep 2017 00:22:45 +0300 |
From: Eric Blake <address@hidden>
If 'bs' is a complex expression, we were only casting the front half
rather than the full expression. Luckily, none of the callers were
passing bad arguments, but it's better to be robust up front.
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
block/nbd-client.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/nbd-client.c b/block/nbd-client.c
index ee7f758e68..cc05e73c2d 100644
--- a/block/nbd-client.c
+++ b/block/nbd-client.c
@@ -31,8 +31,8 @@
#include "qapi/error.h"
#include "nbd-client.h"
-#define HANDLE_TO_INDEX(bs, handle) ((handle) ^ ((uint64_t)(intptr_t)bs))
-#define INDEX_TO_HANDLE(bs, index) ((index) ^ ((uint64_t)(intptr_t)bs))
+#define HANDLE_TO_INDEX(bs, handle) ((handle) ^ (uint64_t)(intptr_t)(bs))
+#define INDEX_TO_HANDLE(bs, index) ((index) ^ (uint64_t)(intptr_t)(bs))
static void nbd_recv_coroutines_wake_all(NBDClientSession *s)
{
--
2.11.0
- [Qemu-trivial] [PULL 15/31] MAINTAINERS: update docs/devel/ entries, (continued)
- [Qemu-trivial] [PULL 15/31] MAINTAINERS: update docs/devel/ entries, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 18/31] util/qemu-thread-posix.c: Replace OS ifdefs with CONFIG_HAVE_SEM_TIMEDWAIT, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 23/31] trivial: Add missing "-m" parameter in docs/memory-hotplug.txt, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 30/31] Drop gld linker usage on SunOS, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 20/31] hw/display/xenfb.c: Add trace_xenfb_key_event, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 22/31] chardev/baum: fix baum that releases brlapi twice, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 29/31] tests/boot-sector: Increase timeout to 600 seconds, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 19/31] aux-to-i2c-bridge: don't allow user to create one, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 31/31] hw/isa/pc87312: Mark the device with user_creatable = false, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 09/31] MAINTAINERS: add missing PCI entries, Michael Tokarev, 2017/09/24
- [Qemu-trivial] [PULL 27/31] nbd-client: Use correct macro parenthesization,
Michael Tokarev <=
- Re: [Qemu-trivial] [Qemu-devel] [PULL 00/31] Trivial patches for 2017-09-25, Peter Maydell, 2017/09/25