[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20170411212938.5901-1-colin.king@canonical.com>
Date: Tue, 11 Apr 2017 22:29:38 +0100
From: Colin King <colin.king@...onical.com>
To: Eric Van Hensbergen <ericvh@...il.com>,
Ron Minnich <rminnich@...dia.gov>,
Latchesar Ionkov <lucho@...kov.net>,
"David S . Miller" <davem@...emloft.net>,
v9fs-developer@...ts.sourceforge.net, netdev@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] xen/9pfs: use %d format specifier instead of %u for a signed int
From: Colin Ian King <colin.king@...onical.com>
variable i is a signed int, so use the %d print format specifier instead of
%u. Fixes two warnings by cppcheck.
Signed-off-by: Colin Ian King <colin.king@...onical.com>
---
net/9p/trans_xen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/9p/trans_xen.c b/net/9p/trans_xen.c
index 47864245c0d4..9b66087bbc91 100644
--- a/net/9p/trans_xen.c
+++ b/net/9p/trans_xen.c
@@ -441,13 +441,13 @@ static int xen_9pfs_front_probe(struct xenbus_device *dev,
char str[16];
BUILD_BUG_ON(XEN_9PFS_NUM_RINGS > 9);
- sprintf(str, "ring-ref%u", i);
+ sprintf(str, "ring-ref%d", i);
ret = xenbus_printf(xbt, dev->nodename, str, "%d",
priv->rings[i].ref);
if (ret)
goto error_xenbus;
- sprintf(str, "event-channel-%u", i);
+ sprintf(str, "event-channel-%d", i);
ret = xenbus_printf(xbt, dev->nodename, str, "%u",
priv->rings[i].evtchn);
if (ret)
--
2.11.0
Powered by blists - more mailing lists