Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d130c14c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Nathan Scott
Browse files

[XFS] simplify ASSERT



SGI-PV: 938063
SGI-Modid: xfs-linux:xfs-kern:194416a

Signed-off-by: default avatarChristoph Hellwig <hch@sgi.com>
Signed-off-by: default avatarNathan Scott <nathans@sgi.com>
parent 7d795ca3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@
#include <linux/sched.h>
#include <linux/kernel.h>

int			doass = 1;
static char		message[256];	/* keep it off the stack */
static DEFINE_SPINLOCK(xfs_err_lock);

+1 −6
Original line number Diff line number Diff line
@@ -50,16 +50,11 @@ extern void cmn_err(int, char *, ...);
#endif

#ifdef DEBUG
# ifdef lint
#  define ASSERT(EX)	((void)0) /* avoid "constant in conditional" babble */
# else
#  define ASSERT(EX) ((!doass||(EX))?((void)0):assfail(#EX, __FILE__, __LINE__))
# endif	/* lint */
# define ASSERT(EX)	((EX) ? ((void)0) : assfail(#EX, __FILE__, __LINE__))
#else
# define ASSERT(x)	((void)0)
#endif

extern int doass;		/* dynamically turn off asserts */
extern void assfail(char *, char *, int);
#ifdef DEBUG
extern unsigned long random(void);