[PATCH 02/11] ratp: fix use of %hu for printing int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 common/ratp/mw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/ratp/mw.c b/common/ratp/mw.c
index 55e79bbaf08b..772910b39d1b 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;
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux