Re: [PATCH/RFC v1 1/1] Use size_t instead of unsigned long

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

 



Torsten Bögershausen <tboegi@xxxxxx> writes:

> The only problematic system is Win64, where "unsigned long" is 32 bit,
> and therefore we must use size_t to address data in memory.
> This is not to be confused with off_t, which is used for "data on disk"
> (and nothing else) or timestamp_t which is used for timestamps (and nothing else).
>
> I haven't followed the "coccinelle script" development at all, if someone
> makes a patch do replace "unsigned long" with size_t, that could replace
> my whole patch. (Some of them may be downgraded to "unsigned int" ?)

This paragraph makes it sound as if this patch is s/ulong/size_t/,
but that contradicts with the previous paragraph, no?  It is much
better to leave a ulong that is not about the size of a memory
region as-is, to be turned into appropriate and correct type later,
than changing it into another wrong type (size_t).

In short, we could do ulong to size_t with Coccinelle, but I do not
think we want to blindly rewrite all.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux