qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] utils: Work around mingw strto*l bug with 0x


From: Thomas Huth
Subject: Re: [PATCH 2/2] utils: Work around mingw strto*l bug with 0x
Date: Thu, 18 Mar 2021 06:07:40 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0

On 17/03/2021 15.33, Eric Blake wrote:
Mingw recognizes that "0x" has value 0 without setting errno, but
fails to advance endptr to the trailing garbage 'x'.  This in turn
showed up in our recent testsuite additions for qemu_strtosz (commit
1657ba44b4 utils: Enhance testsuite for do_strtosz()); adjust our
remaining tests to show that we now work around this windows bug.

This patch intentionally fails check-syntax for use of strtol.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
  tests/unit/test-cutils.c | 54 ++++++++++++++++++++++++++++++++++++++++
  util/cutils.c            | 29 +++++++++++++++------
  2 files changed, 75 insertions(+), 8 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]