Module: xenomai-forge Branch: master Commit: 1cdc0ab98560dd8170960c831e2244bb1b3c7310 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=1cdc0ab98560dd8170960c831e2244bb1b3c7310
Author: Philippe Gerum <r...@xenomai.org> Date: Wed Mar 21 10:51:34 2012 +0100 copperplate/debug: always enable bad pointer detection --- include/copperplate/debug.h | 19 ++++++++----------- 1 files changed, 8 insertions(+), 11 deletions(-) diff --git a/include/copperplate/debug.h b/include/copperplate/debug.h index 8ff4cd1..c2942b4 100644 --- a/include/copperplate/debug.h +++ b/include/copperplate/debug.h @@ -19,16 +19,13 @@ #ifndef _COPPERPLATE_DEBUG_H #define _COPPERPLATE_DEBUG_H +#include <stdint.h> +#include <stddef.h> + #ifdef __XENO_DEBUG__ -#include <stdint.h> #include <pthread.h> -static inline int bad_pointer(const void *ptr) -{ - return ptr == NULL || ((intptr_t)ptr & (sizeof(intptr_t)-1)) != 0; -} - static inline int must_check(void) { return 1; @@ -101,11 +98,6 @@ int debug_pkg_init(void); #else /* !__XENO_DEBUG__ */ -static inline int bad_pointer(const void *ptr) -{ - return 0; -} - static inline int must_check(void) { return 0; @@ -146,4 +138,9 @@ struct backtrace_data { #endif /* !__XENO_DEBUG__ */ +static inline int bad_pointer(const void *ptr) +{ + return ptr == NULL || ((intptr_t)ptr & (sizeof(intptr_t)-1)) != 0; +} + #endif /* _COPPERPLATE_DEBUG_H */ _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git