[lkml]   [2004]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Use NULL instead of integer 0 in security/selinux/

    On Thu, 8 Jul 2004, Miles Bader wrote:

    > "David S. Miller" <> writes:
    > >> What's wrong with using 0 as the NULL pointer? In contexts where
    > >> a plain 0 is unsafe, NULL is usually unsafe as well.
    > >
    > > It's a general sparse cleanup people are doing across the entire tree.
    > > It's the "proper" way to do pointer comparisons post-K&R.
    > But 0 in such a context isn't an integer, it's a pointer...

    No it's not.

    I'm sorry that you are such a K&R-C bigot that you don't like type
    checking. But the kernel DOES like type checking, and the kernel is not
    K&R C. The kernel uses strict ANSI, and in fact, is _more_ strict than
    ANSI C is in many many ways.

    One of the "strict typechecking" rules is that you don't mix integers and
    pointers by mistake. The fact that C allows dual usage of the integer "0"
    is an anachronism that should have been fixed long ago.

    Final word: K&R C without prototypes etc is still "legal C". That doesn't
    make it legal kernel code.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-11-18 23:46    [W:0.019 / U:133.040 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site