]> git.ipfire.org Git - thirdparty/qemu.git/commit - qapi/string-output-visitor.c
qapi/string-output-visitor: fix bugs
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 18 Jun 2014 14:59:51 +0000 (17:59 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 19 Jun 2014 15:44:22 +0000 (18:44 +0300)
commit56fdfb6106276b761e360a84321bab0765bfa15d
tree6647cee68f66de412f402a01ef86dc2bdc5cead4
parent6ffa1695769d0227e28715f7e77cdc49aeab1b8c
qapi/string-output-visitor: fix bugs

in human mode, we are creating the string:

16-31 (16-31)

instead of

16-17 (10-1f)

because we forgot to pass 'true' as the human parameter on one of the
two calls to format_string.
Also, this is a worsening of quality; previously we would produce

16 (0x10)

to make it obvious which number was hex.
Fix these issues.

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
qapi/string-output-visitor.c