[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH v4 0/4] strtosz() cleanups
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] Re: [PATCH v4 0/4] strtosz() cleanups |
Date: |
Tue, 25 Jan 2011 14:19:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Jes Sorensen <address@hidden> writes:
> On 01/25/11 11:14, Markus Armbruster wrote:
>> Jes Sorensen <address@hidden> writes:
>>
>>> On 01/24/11 18:28, Stefan Weil wrote:
>>>> There was some discussion regarding this patch set.
>>>> I agree with Markus that part of the first patch
>>>> should be removed: don't change char to unsigned char.
>>>
>>> The unsigned char should definitely go in, leaving it as a signed char
>>> doesn't serve any purpose.
>>
>> Leaving something as is doesn't need justification. Changing it does.
>> The justification presented so far was "it is prettier to match the real
>> behavior of pure toupper()". Which I don't buy. But without commit
>> access, I'm not a buyer.
>
> Well that is just too bad. qemu_toupper() is a hack around the fact that
> people often forget to use the right type, it is not an excuse for using
> the wrong type in the code.
qemu_toupper() is designed to work correctly for any character argument,
be it signed or unsigned.
The fact that toupper() works only for unsigned character values is
irrelevant for qemu_toupper().
The fact that qemu_toupper()'s implementation uses toupper() is an
implementation detail.
- Re: [Qemu-devel] [PATCH 4/4] strtosz(): Use suffix macros in switch() statement, (continued)
[Qemu-devel] [PATCH 3/4] strtosz(): Fix name confusion in use of modf(), Jes . Sorensen, 2011/01/24
[Qemu-devel] Re: [PATCH v4 0/4] strtosz() cleanups, Kevin Wolf, 2011/01/24