Re: ehci tests unsigned variables against 0

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

 



On Saturday 19 April 2008, Matthew Wilcox wrote:
> These tests will never trigger and should simply be removed.  Linux's
> kernel snprintf function conforms to C99 and never returns 0.

I think you mean "never returns negative" ?

-ENOPATCH

... although if that's the case, I'd think that the *snprintf()
signatures are incorrect:  they should return "unsigned" not "int".
If that were done, I think even GCC could be made to report such
issues; one wouldn't need less-common tools like coccinelle.

(What I've seen of coccinelle makes me glad it's being applied to
the kernel sources, by the way.)

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

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux