Re: [Qemu-devel] [PATCH v2 5/6] pc-bios/s390-ccw: Clean up harmless misuse of isdigit()

2019-05-14 Thread Thomas Huth
On 14/05/2019 20.04, Christian Borntraeger wrote: > > > On 14.05.19 20:03, Markus Armbruster wrote: >> atoui() and get_index() pass char values to isdigit(). With a >> standard isdigit(), we'd get undefined behavior when the value is >> negative. Can't happen as char is unsigned on s390x.

[Qemu-devel] [PATCH v2 5/6] pc-bios/s390-ccw: Clean up harmless misuse of isdigit()

2019-05-14 Thread Markus Armbruster
atoui() and get_index() pass char values to isdigit(). With a standard isdigit(), we'd get undefined behavior when the value is negative. Can't happen as char is unsigned on s390x. Even if it could, we're actually using isdigit() from pc-bios/s390-ccw/libc.h here, which works fine for negative

Re: [Qemu-devel] [PATCH v2 5/6] pc-bios/s390-ccw: Clean up harmless misuse of isdigit()

2019-05-14 Thread Christian Borntraeger
On 14.05.19 20:03, Markus Armbruster wrote: > atoui() and get_index() pass char values to isdigit(). With a > standard isdigit(), we'd get undefined behavior when the value is > negative. Can't happen as char is unsigned on s390x. Even if it > could, we're actually using isdigit() from