Enclose (void *)0 in an extra set of parenthese to make the result usable
in arbitrary expressions. Fixes PR/41890, I can't think of any downsides!
This commit is contained in:
parent
c9c7f30b6e
commit
d8e92c2a50
|
@ -1,11 +1,11 @@
|
|||
/* $NetBSD: null.h,v 1.7 2005/12/03 17:10:46 christos Exp $ */
|
||||
/* $NetBSD: null.h,v 1.8 2009/10/13 17:19:00 dsl Exp $ */
|
||||
|
||||
#ifndef _SYS_NULL_H_
|
||||
#define _SYS_NULL_H_
|
||||
#ifndef NULL
|
||||
#if !defined(__GNUG__) || __GNUG__ < 2 || (__GNUG__ == 2 && __GNUC_MINOR__ < 90)
|
||||
#if !defined(__cplusplus)
|
||||
#define NULL (void *)0
|
||||
#define NULL ((void *)0)
|
||||
#else
|
||||
#define NULL 0
|
||||
#endif /* !__cplusplus */
|
||||
|
|
Loading…
Reference in New Issue