diff options
Diffstat (limited to 'helper')
-rw-r--r-- | helper/include/odp/helper/odph_debug.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/helper/include/odp/helper/odph_debug.h b/helper/include/odp/helper/odph_debug.h index 20ba3d04b..157f765d6 100644 --- a/helper/include/odp/helper/odph_debug.h +++ b/helper/include/odp/helper/odph_debug.h @@ -63,25 +63,11 @@ typedef enum odph_log_level { */ #define ODPH_LOG(level, fmt, ...) \ do { \ - switch (level) { \ - case ODPH_LOG_ERR: \ + if (level != ODPH_LOG_DBG || ODPH_DEBUG_PRINT == 1) \ fprintf(stderr, "%s:%d:%s():" fmt, __FILE__, \ __LINE__, __func__, ##__VA_ARGS__); \ - break; \ - case ODPH_LOG_DBG: \ - if (ODPH_DEBUG_PRINT == 1) \ - fprintf(stderr, "%s:%d:%s():" fmt, __FILE__, \ - __LINE__, __func__, ##__VA_ARGS__); \ - break; \ - case ODPH_LOG_ABORT: \ - fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \ - __LINE__, __func__, ##__VA_ARGS__); \ + if (level == ODPH_LOG_ABORT) \ abort(); \ - break; \ - default: \ - fprintf(stderr, "Unknown LOG level"); \ - break;\ - } \ } while (0) /** |