From 4eb7c1bf6dffe4166e6c9b609eefa261033c4224 Mon Sep 17 00:00:00 2001 From: Le Tin Date: Thu, 22 Sep 2022 11:43:18 +0700 Subject: [PATCH] dlt_daemon_client: Fix change loglevel of application - Type of return value of strncmp() is int - Should replace int8_t by int to avoid error when casting Signed-off-by: Le Tin --- src/daemon/dlt_daemon_client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c index becd061c4..99253806c 100644 --- a/src/daemon/dlt_daemon_client.c +++ b/src/daemon/dlt_daemon_client.c @@ -1690,7 +1690,7 @@ void dlt_daemon_find_multiple_context_and_send_log_level(int sock, int count = 0; DltDaemonContext *context = NULL; char src_str[DLT_ID_SIZE + 1] = { 0 }; - int8_t ret = 0; + int ret = 0; DltDaemonRegisteredUsers *user_list = NULL; if (daemon == 0) { @@ -1712,7 +1712,7 @@ void dlt_daemon_find_multiple_context_and_send_log_level(int sock, else strncpy(src_str, context->ctid, DLT_ID_SIZE); - ret = (int8_t) strncmp(src_str, str, (size_t) len); + ret = strncmp(src_str, str, len); if (ret == 0) dlt_daemon_send_log_level(sock, daemon, daemon_local, context, loglevel, verbose); @@ -1863,7 +1863,7 @@ void dlt_daemon_find_multiple_context_and_send_trace_status(int sock, int count = 0; DltDaemonContext *context = NULL; char src_str[DLT_ID_SIZE + 1] = { 0 }; - int8_t ret = 0; + int ret = 0; DltDaemonRegisteredUsers *user_list = NULL; if (daemon == 0) { @@ -1885,7 +1885,7 @@ void dlt_daemon_find_multiple_context_and_send_trace_status(int sock, else strncpy(src_str, context->ctid, DLT_ID_SIZE); - ret = (int8_t) strncmp(src_str, str, (size_t) len); + ret = strncmp(src_str, str, len); if (ret == 0) dlt_daemon_send_trace_status(sock, daemon, daemon_local, context, tracestatus, verbose);