On 06/05/2007 03:58 PM, John Anthony Kazos Jr. wrote:
So "ZERO_SIZE_OBJ_PTR" is the most correct form, and "ZERO_SIZE_PTR" is a convenient shortening. "ZERO_PTR" is too short and also confuses with NULL because NULL is a zero-value object, rather than a non-zero--value pointer to a zero-size object.
Like I said, I would prefer NIL of if absolutely need be NIL_PTR. NULL is a pointer that doesn't point anywhere valid -- NIL is a pointer that points to a zero sized object.
If I'd have a few small children around I'd show them the word ZERO_SIZE_PTR and make pictures of them bursting out in tears.
Rene. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Pekka Enberg <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- References:
- SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Christoph Lameter <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Linus Torvalds <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Christoph Lameter <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: "Pekka Enberg" <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Christoph Lameter <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Pekka Enberg <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Christoph Lameter <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Andrew Morton <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Christoph Lameter <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Rene Herman <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: "John Anthony Kazos Jr." <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: Rene Herman <[email protected]>
- Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- From: "John Anthony Kazos Jr." <[email protected]>
- SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- Prev by Date: Re: BUG in 2.6.22-rc2-mm1: Parts of Alsa sound architecture broken
- Next by Date: Re: libata & no PCI: dma_[un]map_single undefined
- Previous by thread: Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- Next by thread: Re: SLUB: Return ZERO_SIZE_PTR for kmalloc(0)
- Index(es):