From cfc2c86bfec130fb8a95ff0c2553d5c1dd1bd3c1 Mon Sep 17 00:00:00 2001 From: michael-methner Date: Mon, 8 May 2023 09:50:17 +0200 Subject: Fix macro code to use boolean value in while instruction (false) (#469) * Fix macro code to use boolean value in while instruction (false) Signed-off-by: Michael Methner --- src/daemon/dlt_daemon_common.h | 2 +- src/lib/dlt_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/daemon/dlt_daemon_common.h b/src/daemon/dlt_daemon_common.h index f650ce3..1a07491 100644 --- a/src/daemon/dlt_daemon_common.h +++ b/src/daemon/dlt_daemon_common.h @@ -99,7 +99,7 @@ extern "C" { #define DLT_DAEMON_SEM_LOCK() do{\ while ((sem_wait(&dlt_daemon_mutex) == -1) && (errno == EINTR)) \ continue; /* Restart if interrupted */ \ - } while(0) + } while(false) #define DLT_DAEMON_SEM_FREE() { sem_post(&dlt_daemon_mutex); } extern sem_t dlt_daemon_mutex; diff --git a/src/lib/dlt_user.c b/src/lib/dlt_user.c index 52a30e1..0397e48 100644 --- a/src/lib/dlt_user.c +++ b/src/lib/dlt_user.c @@ -85,7 +85,7 @@ int *p = NULL; \ *p = 0; \ } \ - } while (0) + } while (false) #else /* DLT_FATAL_LOG_RESET_ENABLE */ # define DLT_LOG_FATAL_RESET_TRAP(LOGLEVEL) #endif /* DLT_FATAL_LOG_RESET_ENABLE */ -- cgit v1.2.1