On 02/14/2017 04:25 AM, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <arm...@redhat.com>
> ---
>  tests/test-cutils.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/tests/test-cutils.c b/tests/test-cutils.c
> index 20b0f59..71681dc 100644
> --- a/tests/test-cutils.c
> +++ b/tests/test-cutils.c
> @@ -262,6 +262,7 @@ static void test_qemu_strtol_empty(void)
>      err = qemu_strtol(str, &endptr, 0, &res);
>  
>      g_assert_cmpint(err, ==, -EINVAL);
> +    g_assert(endptr == str);
>  }

In other words, enforce more of our contract that even on errors, endptr
is set to a documented value.

Reviewed-by: Eric Blake <ebl...@redhat.com>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to