diff options
author | Christoph Hellwig <hch@sgi.com> | 2005-06-21 01:43:22 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-06-21 01:43:22 -0400 |
commit | d130c14c0310edac5ea0c6327bef7e3715f9a083 (patch) | |
tree | 994ae017609f34e6af8e2ba6f432ed3d65ed13ce | |
parent | 7d795ca3442c7a562c45aeb7a7a808c79992a589 (diff) |
[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>
-rw-r--r-- | fs/xfs/support/debug.c | 1 | ||||
-rw-r--r-- | fs/xfs/support/debug.h | 7 |
2 files changed, 1 insertions, 7 deletions
diff --git a/fs/xfs/support/debug.c b/fs/xfs/support/debug.c index 7d6e1f37df10..4ed7b6928cd7 100644 --- a/fs/xfs/support/debug.c +++ b/fs/xfs/support/debug.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <linux/kernel.h> | 37 | #include <linux/kernel.h> |
38 | 38 | ||
39 | int doass = 1; | ||
40 | static char message[256]; /* keep it off the stack */ | 39 | static char message[256]; /* keep it off the stack */ |
41 | static DEFINE_SPINLOCK(xfs_err_lock); | 40 | static DEFINE_SPINLOCK(xfs_err_lock); |
42 | 41 | ||
diff --git a/fs/xfs/support/debug.h b/fs/xfs/support/debug.h index 40b0f4c54d9e..c5b9365a7e2a 100644 --- a/fs/xfs/support/debug.h +++ b/fs/xfs/support/debug.h | |||
@@ -50,16 +50,11 @@ extern void cmn_err(int, char *, ...); | |||
50 | #endif | 50 | #endif |
51 | 51 | ||
52 | #ifdef DEBUG | 52 | #ifdef DEBUG |
53 | # ifdef lint | 53 | # define ASSERT(EX) ((EX) ? ((void)0) : assfail(#EX, __FILE__, __LINE__)) |
54 | # define ASSERT(EX) ((void)0) /* avoid "constant in conditional" babble */ | ||
55 | # else | ||
56 | # define ASSERT(EX) ((!doass||(EX))?((void)0):assfail(#EX, __FILE__, __LINE__)) | ||
57 | # endif /* lint */ | ||
58 | #else | 54 | #else |
59 | # define ASSERT(x) ((void)0) | 55 | # define ASSERT(x) ((void)0) |
60 | #endif | 56 | #endif |
61 | 57 | ||
62 | extern int doass; /* dynamically turn off asserts */ | ||
63 | extern void assfail(char *, char *, int); | 58 | extern void assfail(char *, char *, int); |
64 | #ifdef DEBUG | 59 | #ifdef DEBUG |
65 | extern unsigned long random(void); | 60 | extern unsigned long random(void); |