]> Git Repo - qemu.git/commit - util/cutils.c
utils: provide size_to_str()
authorPeter Xu <[email protected]>
Fri, 12 May 2017 04:17:40 +0000 (12:17 +0800)
committerDr. David Alan Gilbert <[email protected]>
Wed, 17 May 2017 16:30:45 +0000 (17:30 +0100)
commit22951aaaebb6c4c314c58ad576960a9c57695bbc
treef1071715f4dbec35fdeca1703eaf6fb5815ebb74
parent99e15582dea30d4a7c6fa5be9196d0f4d759231c
utils: provide size_to_str()

Moving the algorithm from print_type_size() into size_to_str() so that
other component can also leverage it. With that, refactor
print_type_size().

The assert() in that logic is removed though, since even UINT64_MAX
would not overflow.

Signed-off-by: Peter Xu <[email protected]>
Message-Id: <1494562661[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
include/qemu-common.h
qapi/string-output-visitor.c
util/cutils.c
This page took 0.022531 seconds and 4 git commands to generate.