aboutsummaryrefslogtreecommitdiff
path: root/block/qcow.c
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-04-29 19:03:12 +0200
committerKevin Wolf <kwolf@redhat.com>2014-04-30 14:46:17 +0200
commit521b2b5df0ccad764cf95164c6e428f855067a6f (patch)
tree6450a83673c3bbd0c980c82ec06bb025dcfeeae3 /block/qcow.c
parent91f827dcff61c3e007def4c949d3a8310954b85e (diff)
downloadqemu-521b2b5df0ccad764cf95164c6e428f855067a6f.zip
qemu-521b2b5df0ccad764cf95164c6e428f855067a6f.tar.gz
qemu-521b2b5df0ccad764cf95164c6e428f855067a6f.tar.bz2
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/qcow.c')
-rw-r--r--block/qcow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/qcow.c b/block/qcow.c
index d5a7d5f..937dd6d 100644
--- a/block/qcow.c
+++ b/block/qcow.c
@@ -119,7 +119,8 @@ static int qcow_open(BlockDriverState *bs, QDict *options, int flags,
}
if (header.version != QCOW_VERSION) {
char version[64];
- snprintf(version, sizeof(version), "QCOW version %d", header.version);
+ snprintf(version, sizeof(version), "QCOW version %" PRIu32,
+ header.version);
error_set(errp, QERR_UNKNOWN_BLOCK_FORMAT_FEATURE,
bs->device_name, "qcow", version);
ret = -ENOTSUP;