1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

core/debug: Fix code style errors

This commit is contained in:
Leandro Lanzieri 2020-02-18 11:45:56 +01:00
parent 981b4eb8d0
commit ea8c85ae8b

View File

@ -45,14 +45,15 @@ extern "C" {
#ifdef DEVELHELP
#include "cpu_conf.h"
#define DEBUG_PRINT(...) \
do { \
if ((sched_active_thread == NULL) || (sched_active_thread->stack_size >= THREAD_EXTRA_STACKSIZE_PRINTF)) { \
printf(__VA_ARGS__); \
} \
else { \
puts("Cannot debug, stack too small. Consider using DEBUG_PUTS()."); \
} \
} while (0)
do { \
if ((sched_active_thread == NULL) || \
(sched_active_thread->stack_size >= THREAD_EXTRA_STACKSIZE_PRINTF)) { \
printf(__VA_ARGS__); \
} \
else { \
puts("Cannot debug, stack too small. Consider using DEBUG_PUTS()."); \
} \
} while (0)
#else
#define DEBUG_PRINT(...) printf(__VA_ARGS__)
#endif
@ -92,7 +93,7 @@ extern "C" {
*
* @note Another name for ::DEBUG_PRINT
*/
#define DEBUG(...) if (ENABLE_DEBUG) DEBUG_PRINT(__VA_ARGS__)
#define DEBUG(...) if (ENABLE_DEBUG) { DEBUG_PRINT(__VA_ARGS__); }
/**
* @def DEBUG_PUTS
@ -100,7 +101,7 @@ extern "C" {
* @brief Print debug information to stdout using puts(), so no stack size
* restrictions do apply.
*/
#define DEBUG_PUTS(str) if (ENABLE_DEBUG) puts(str)
#define DEBUG_PUTS(str) if (ENABLE_DEBUG) { puts(str); }
/** @} */
/**