"Dr. David Alan Gilbert" <dgilb...@redhat.com> writes: > * 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 functional >> change there, because its conversion consumes the string. >> >> Simplify callers that use @endptr only to fail when it doesn't point >> to '\0' to pass a null @endptr instead. >> >> Cc: Dr. David Alan Gilbert <dgilb...@redhat.com> >> Cc: Eduardo Habkost <ehabk...@redhat.com> (maintainer:X86) >> Cc: Kevin Wolf <kw...@redhat.com> (supporter:Block layer core) >> Cc: Max Reitz <mre...@redhat.com> (supporter:Block layer core) >> Cc: qemu-bl...@nongnu.org (open list:Block layer core) >> Signed-off-by: Markus Armbruster <arm...@redhat.com> > > Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > > (end and endptr are horribly confusing names in do_strtosz)
Could rename for consistency with qemu_strtol() & friends: * Parameter @end to @endptr * Local variable @endptr to @ep Would that be useful?