Re: [PATCH 1/3] diff --stat: allow custom diffstat output width.

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

 



Linus Torvalds <torvalds@xxxxxxxx> writes:

> On Thu, 28 Sep 2006, Junio C Hamano wrote:
>> 
>> This is simply too clever; -pedantic does not like assignment of
>> arg to end (constness -- and strtoul takes pointer to non-const
>> char *, so making the type of end const char * is not an answer
>> either).
>
> The _code_ really is right. The problem is "strtoul()" interfaces and a 
> C typing oddity.

Yes, the code is right (not only because you wrote it ;-) and
not just right but it is crystal clear to humans what is going
on and why the final "if (*end)" is all that is needed without
any "return 0" in the middle.

> At that point, the cast is probably simpler,...

... which I ended up doing anyway.

Thanks.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]