|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH XENSTORE v1 02/10] 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>
---
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
--- 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);
--
2.17.1
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |