|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xenstore: fix print format string
commit 5c4634f22696bc609c96f0754832268ed1247059
Author: Norbert Manthey <nmanthey@xxxxxxxxx>
AuthorDate: Fri Feb 26 15:41:36 2021 +0100
Commit: Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Wed Mar 3 18:12:05 2021 +0000
xenstore: fix print format string
Use the correct format specifier for unsigned values. Additionally, a
cast was dropped, as the format specifier did not require it anymore.
This was reported by analysis with cppcheck.
Signed-off-by: Norbert Manthey <nmanthey@xxxxxxxxx>
Reviewed-by: Thomas Friebel <friebelt@xxxxxxxxx>
Reviewed-by: Julien Grall <jgrall@xxxxxxxxxxxx>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
Release-Acked-by: Ian Jackson <iwj@xxxxxxxxxxxxxx>
---
tools/xenstore/xs_tdb_dump.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/xenstore/xs_tdb_dump.c b/tools/xenstore/xs_tdb_dump.c
index 207ed446d5..f74676cf1c 100644
--- a/tools/xenstore/xs_tdb_dump.c
+++ b/tools/xenstore/xs_tdb_dump.c
@@ -59,8 +59,8 @@ int main(int argc, char *argv[])
fprintf(stderr, "%.*s: BAD truncated\n",
(int)key.dsize, key.dptr);
else if (data.dsize != total_size(hdr))
- fprintf(stderr, "%.*s: BAD length %i for %i/%i/%i
(%i)\n",
- (int)key.dsize, key.dptr, (int)data.dsize,
+ fprintf(stderr, "%.*s: BAD length %zu for %u/%u/%u
(%u)\n",
+ (int)key.dsize, key.dptr, data.dsize,
hdr->num_perms, hdr->datalen,
hdr->childlen, total_size(hdr));
else {
@@ -69,7 +69,7 @@ int main(int argc, char *argv[])
printf("%.*s: ", (int)key.dsize, key.dptr);
for (i = 0; i < hdr->num_perms; i++)
- printf("%s%c%i",
+ printf("%s%c%u",
i == 0 ? "" : ",",
perm_to_char(hdr->perms[i].perms),
hdr->perms[i].id);
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |