]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/assert.h
xnu-4570.20.62.tar.gz
[apple/xnu.git] / osfmk / kern / assert.h
index e0ffbaf9a5a7f7d492c24900d87af79a36c7d70e..f35eadc4321378a994b7893ea8e467c0c9ae6226 100644 (file)
@@ -77,12 +77,7 @@ extern void  Assert(
 
 extern int kext_assertions_enable;
 
-#ifdef CONFIG_NO_PANIC_STRINGS
-#define Assert(file, line, ex) (Assert)("", line, "")
-#define __Panic(fmt, args...) panic("", ##args)
-#else /* CONFIG_NO_PANIC_STRINGS */
 #define __Panic(fmt, args...) panic(fmt, ##args)
-#endif /* CONFIG_NO_PANIC_STRINGS */
 
 __END_DECLS
 
@@ -93,17 +88,17 @@ __END_DECLS
 #if    MACH_ASSERT
 
 #define assert(ex)  \
-       (__builtin_expect(!!((long)(ex)), 1L) ? (void)0 : Assert(__FILE__, __LINE__, # ex))
+       (__builtin_expect(!!((ex)), 1L) ? (void)0 : Assert(__FILE__, __LINE__, # ex))
 #define assertf(ex, fmt, args...) \
-       (__builtin_expect(!!((long)(ex)), 1L) ? (void)0 : __Panic("%s:%d Assertion failed: %s : " fmt, __FILE__, __LINE__, # ex, ##args))
+       (__builtin_expect(!!((ex)), 1L) ? (void)0 : __Panic("%s:%d Assertion failed: %s : " fmt, __FILE__, __LINE__, # ex, ##args))
 #define __assert_only
 
 #elif APPLE_KEXT_ASSERTIONS && !XNU_KERNEL_PRIVATE     /* MACH_ASSERT */
 
 #define assert(ex)  \
-       (__builtin_expect(!!((long)((!kext_assertions_enable) || (ex))), 1L) ? (void)0 : Assert(__FILE__, __LINE__, # ex))
+       (__builtin_expect(!!(((!kext_assertions_enable) || (ex))), 1L) ? (void)0 : Assert(__FILE__, __LINE__, # ex))
 #define assertf(ex, fmt, args...) \
-       (__builtin_expect(!!((long)((!kext_assertions_enable) || (ex))), 1L) ? (void)0 : __Panic("%s:%d Assertion failed: %s : " fmt, __FILE__, __LINE__, # ex, ##args))
+       (__builtin_expect(!!(((!kext_assertions_enable) || (ex))), 1L) ? (void)0 : __Panic("%s:%d Assertion failed: %s : " fmt, __FILE__, __LINE__, # ex, ##args))
 #define __assert_only
 
 #else                          /* APPLE_KEXT_ASSERTIONS && !XNU_KERNEL_PRIVATE */