summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2019-08-22 07:51:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-08-30 09:26:06 +0200
commitb1d88eadaa7772f8f01a402dcdd7f70e8c36c166 (patch)
treeb8fa12b216c60dce19f8eb6a2fec99f91454eae0 /common
parent4972156c9ed72432489cfd6c5499cab9d41694f7 (diff)
downloadbarebox-b1d88eadaa7772f8f01a402dcdd7f70e8c36c166.tar.gz
barebox-b1d88eadaa7772f8f01a402dcdd7f70e8c36c166.tar.xz
ratp: fix use of %hu for printing int
While each of path_size and data_size is 16 bit in size, their sum may exceed this. Also the type of the resulting expression is an int, thus change the format specifier accordingly. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common')
-rw-r--r--common/ratp/mw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/ratp/mw.c b/common/ratp/mw.c
index 55e79bbaf0..772910b39d 100644
--- a/common/ratp/mw.c
+++ b/common/ratp/mw.c
@@ -125,7 +125,7 @@ static int ratp_cmd_mw(const struct ratp_bb *req, int req_len,
/* Validate buffer size */
if (buffer_size < (path_size + data_size)) {
- pr_err("ignored: size mismatch (%d < %hu): path or data not be fully given\n",
+ pr_err("ignored: size mismatch (%d < %u): path or data not be fully given\n",
req_len, path_size + data_size);
ret = -EINVAL;
goto out;