Re: [Qemu-block] [PATCH 21/24] util/cutils: Let qemu_strtosz*() optionally reject trailing crap

2017-02-20 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Change the qemu_strtosz() & friends to return -EINVAL when @endptr is > null and the conversion doesn't consume the string completely. > Matches how qemu_strtol() & friends work. > > Only test_qemu_strtosz_simple() passes a null @endptr. No

[Qemu-block] [PATCH 21/24] util/cutils: Let qemu_strtosz*() optionally reject trailing crap

2017-02-14 Thread Markus Armbruster
Change the qemu_strtosz() & friends to return -EINVAL when @endptr is null and the conversion doesn't consume the string completely. Matches how qemu_strtol() & friends work. Only test_qemu_strtosz_simple() passes a null @endptr. No functional change there, because its conversion consumes the