diff options
author | Richard Braun <rbraun@sceen.net> | 2018-01-29 00:52:40 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2018-01-29 01:12:05 +0100 |
commit | bc6e853d4b27055056eebfd871aaf0fc60405b0f (patch) | |
tree | 9860d545d88a627fcea3309efea89cb27779aaf9 /kern/rtmutex.c | |
parent | 3ec2193d8538beec5d961d11d67f568d8d3f6cd8 (diff) |
Fix undefined behavior in conditional macro replacement
See C11 6.10.3 ยง11 :
If there are sequences of preprocessing tokens within the list of
arguments that would otherwise act as preprocessing directives,
the behavior is undefined.
Diffstat (limited to 'kern/rtmutex.c')
-rw-r--r-- | kern/rtmutex.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/kern/rtmutex.c b/kern/rtmutex.c index 7457196d..55d17cdc 100644 --- a/kern/rtmutex.c +++ b/kern/rtmutex.c @@ -240,9 +240,14 @@ rtmutex_setup(void) return 0; } -INIT_OP_DEFINE(rtmutex_setup, - INIT_OP_DEP(rtmutex_bootstrap, true), #ifdef CONFIG_MUTEX_DEBUG +#define RTMUTEX_DEBUG_INIT_OPS \ INIT_OP_DEP(syscnt_setup, true), +#else /* CONFIG_MUTEX_DEBUG */ +#define RTMUTEX_DEBUG_INIT_OPS #endif /* CONFIG_MUTEX_DEBUG */ + +INIT_OP_DEFINE(rtmutex_setup, + INIT_OP_DEP(rtmutex_bootstrap, true), + RTMUTEX_DEBUG_INIT_OPS ); |