Jes Sorensen <jes.soren...@redhat.com> writes:

> On 01/25/11 11:14, Markus Armbruster wrote:
>> Jes Sorensen <jes.soren...@redhat.com> 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.

Reply via email to