[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies) |
Date: |
Thu, 09 Feb 2012 15:11:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2012-02-09 13:07, Paul Brook wrote:
>>>> What about naming the problem instead:
>>>>
>>>> /* Comparison with IOCTL macros on 32-bit hosts requires unsigned. */
>>>
>>> Just once, it would be nice to post something to this list and get a
>>> substantive comment _before_ the bitching about minutiae.
>>>
>>> Oh, and it's not just 32-bit hosts, it's anywhere sizeof(int)==4,
>>> which includes ppc64 amongst other 64-bit hosts.
>>
>> Then state "if int is 32 bits". The comment is unfortunately not helpful
>> without the commit log.
>
> Int is 32 bits on every host we're ever likey to care about, so clearly
> there's something else going on.
Yep. So a better explanation could be "Required for comparison with
unsigned IOCTL macro values". This wasn't noticed so far as the original
code was never build on anything but IA32/64.
Jan
signature.asc
Description: OpenPGP digital signature