diff options
author | Max Reitz <mreitz@redhat.com> | 2014-04-29 19:03:12 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-04-30 14:46:17 +0200 |
commit | 521b2b5df0ccad764cf95164c6e428f855067a6f (patch) | |
tree | 6450a83673c3bbd0c980c82ec06bb025dcfeeae3 /block/sheepdog.c | |
parent | 91f827dcff61c3e007def4c949d3a8310954b85e (diff) |
block: Use correct width in format strings
Instead of blindly relying on a normal integer having a width of 32 bits
(which is a pretty good assumption, but we should not rely on it if
there is no need), use the correct format string macros.
This does not touch DEBUG output.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/sheepdog.c')
-rw-r--r-- | block/sheepdog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c index 0eb33ee80e..2c3fb016a8 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -1099,7 +1099,7 @@ static int find_vdi_name(BDRVSheepdogState *s, const char *filename, } if (rsp->result != SD_RES_SUCCESS) { - error_report("cannot get vdi info, %s, %s %d %s", + error_report("cannot get vdi info, %s, %s %" PRIu32 " %s", sd_strerror(rsp->result), filename, snapid, tag); if (rsp->result == SD_RES_NO_VDI) { ret = -ENOENT; @@ -2316,8 +2316,8 @@ static int sd_snapshot_list(BlockDriverState *bs, QEMUSnapshotInfo **psn_tab) sn_tab[found].vm_state_size = inode.vm_state_size; sn_tab[found].vm_clock_nsec = inode.vm_clock_nsec; - snprintf(sn_tab[found].id_str, sizeof(sn_tab[found].id_str), "%u", - inode.snap_id); + snprintf(sn_tab[found].id_str, sizeof(sn_tab[found].id_str), + "%" PRIu32, inode.snap_id); pstrcpy(sn_tab[found].name, MIN(sizeof(sn_tab[found].name), sizeof(inode.tag)), inode.tag); |