From 912ab38e78ab22cd3817eeb9904127a60927931e Mon Sep 17 00:00:00 2001 From: lti9hc <114125133+lti9hc@users.noreply.github.com> Date: Wed, 28 Sep 2022 15:39:08 +0700 Subject: dlt_daemon_client: Fix change loglevel of application (#408) - Type of return value of strncmp() is int - Should replace int8_t by int to avoid error when casting Signed-off-by: Le Tin Signed-off-by: Le Tin Co-authored-by: Le Tin --- src/daemon/dlt_daemon_client.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c index becd061..9925380 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); -- cgit v1.2.1