Re: [Qemu-devel] [PATCH v8 2/3] utils: provide size_to_str()

2017-05-16 Thread Markus Armbruster
Peter Xu writes: > 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. I'd keep it. > Signed-off-by:

Re: [Qemu-devel] [PATCH v8 2/3] utils: provide size_to_str()

2017-05-12 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > 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-

[Qemu-devel] [PATCH v8 2/3] utils: provide size_to_str()

2017-05-11 Thread Peter Xu
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 --- include/qemu-common.h|