[Top][All Lists]

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

Re: [qemu-s390x] [PATCH v2 5/6] pc-bios/s390-ccw: Clean up harmless misu

From: Thomas Huth
Subject: Re: [qemu-s390x] [PATCH v2 5/6] pc-bios/s390-ccw: Clean up harmless misuse of isdigit()
Date: Tue, 14 May 2019 20:38:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

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.  Even if it
>> could, we're actually using isdigit() from pc-bios/s390-ccw/libc.h
>> here, which works fine for negative values.  Clean up anyway, just
>> to avoid setting a bad example.
>> Cc: Christian Borntraeger <address@hidden>
> Acked-by: Christian Borntraeger <address@hidden>

FYI, this patch is already queued in Cornelia's s390-next tree (and it
should also go via her tree, since you need to rebuild the bios binary


reply via email to

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