[lkml]   [2003]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Style question: Should one check for NULL pointers?
    Followup to:  <>
    By author: Eli Carter <>
    In newsgroup:
    > Alan Stern wrote:
    > [snip]
    > > Ultimately this comes down to a question of style and taste. This
    > > particular issue is not addressed in Documentation/CodingStyle so I'm
    > > raising it here. My personal preference is for code that means what it
    > > says; if a pointer is checked it should be because there is a genuine
    > > possibility that the pointer _is_ NULL. I see no reason for pure
    > > paranoia, particularly if it's not commented as such.
    > >
    > > Comments, anyone?
    > BUG_ON() perhaps?

    BUG_ON() is largely redundant if you would have a null pointer
    reference anyway.

    <> at work, <> in private!
    If you send me mail in HTML format I will assume it's spam.
    "Unix gives you enough rope to shoot yourself in the foot."
    Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
    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: 2005-03-22 13:46    [W:0.022 / U:2.344 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site