mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
[XFS] simplify ASSERT
SGI-PV: 938063 SGI-Modid: xfs-linux:xfs-kern:194416a Signed-off-by: Christoph Hellwig <hch@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
This commit is contained in:
parent
7d795ca344
commit
d130c14c03
@ -36,7 +36,6 @@
|
|||||||
#include <linux/sched.h>
|
#include <linux/sched.h>
|
||||||
#include <linux/kernel.h>
|
#include <linux/kernel.h>
|
||||||
|
|
||||||
int doass = 1;
|
|
||||||
static char message[256]; /* keep it off the stack */
|
static char message[256]; /* keep it off the stack */
|
||||||
static DEFINE_SPINLOCK(xfs_err_lock);
|
static DEFINE_SPINLOCK(xfs_err_lock);
|
||||||
|
|
||||||
|
@ -50,16 +50,11 @@ extern void cmn_err(int, char *, ...);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
# ifdef lint
|
# define ASSERT(EX) ((EX) ? ((void)0) : assfail(#EX, __FILE__, __LINE__))
|
||||||
# define ASSERT(EX) ((void)0) /* avoid "constant in conditional" babble */
|
|
||||||
# else
|
|
||||||
# define ASSERT(EX) ((!doass||(EX))?((void)0):assfail(#EX, __FILE__, __LINE__))
|
|
||||||
# endif /* lint */
|
|
||||||
#else
|
#else
|
||||||
# define ASSERT(x) ((void)0)
|
# define ASSERT(x) ((void)0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern int doass; /* dynamically turn off asserts */
|
|
||||||
extern void assfail(char *, char *, int);
|
extern void assfail(char *, char *, int);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
extern unsigned long random(void);
|
extern unsigned long random(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user