From 6088448cdfe3cd152c53136544acc4ee7a508a84 Mon Sep 17 00:00:00 2001 From: Saya Sugiura Date: Wed, 12 Jun 2019 16:18:02 +0900 Subject: Fix alerts from lgtm Signed-off-by: Saya Sugiura --- src/daemon/dlt_daemon_client.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/daemon/dlt_daemon_client.c') diff --git a/src/daemon/dlt_daemon_client.c b/src/daemon/dlt_daemon_client.c index fd2bde4..e2a0d12 100644 --- a/src/daemon/dlt_daemon_client.c +++ b/src/daemon/dlt_daemon_client.c @@ -1505,7 +1505,8 @@ void dlt_daemon_control_callsw_cinjection(int sock, DLT_MSG_READ_VALUE(id_tmp, ptr, datalength, uint32_t); /* Get service id */ id = DLT_ENDIAN_GET_32(msg->standardheader->htyp, id_tmp); - if ((id >= DLT_DAEMON_INJECTION_MIN) && (id <= DLT_DAEMON_INJECTION_MAX)) { + /* id is always less than DLT_DAEMON_INJECTION_MAX since its type is uinit32_t */ + if (id >= DLT_DAEMON_INJECTION_MIN) { /* This a a real SW-C injection call */ data_length_inject = 0; data_length_inject_tmp = 0; @@ -2123,7 +2124,6 @@ void dlt_daemon_control_set_timing_packets(int sock, void dlt_daemon_control_message_time(int sock, DltDaemon *daemon, DltDaemonLocal *daemon_local, int verbose) { - int ret; DltMessage msg; int32_t len; @@ -2185,12 +2185,12 @@ void dlt_daemon_control_message_time(int sock, DltDaemon *daemon, DltDaemonLocal msg.standardheader->len = DLT_HTOBE_16(((uint16_t)len)); - /* Send message */ - if ((ret = - dlt_daemon_client_send(sock, daemon, daemon_local, msg.headerbuffer, sizeof(DltStorageHeader), - msg.headerbuffer + sizeof(DltStorageHeader), - msg.headersize - sizeof(DltStorageHeader), - msg.databuffer, msg.datasize, verbose))) {} + /* Send message, ignore return value */ + dlt_daemon_client_send(sock, daemon, daemon_local, msg.headerbuffer, + sizeof(DltStorageHeader), + msg.headerbuffer + sizeof(DltStorageHeader), + msg.headersize - sizeof(DltStorageHeader), + msg.databuffer, msg.datasize, verbose); /* free message */ dlt_message_free(&msg, 0); -- cgit v1.2.1