summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Rusu <andrew_x_2005@yahoo.com>2022-11-30 11:38:44 +0200
committerGitHub <noreply@github.com>2022-11-30 10:38:44 +0100
commited8354ff0255061222e35b81a9cc156ec3b056ae (patch)
treee2b2054f2072c6fca5c6c1c5e2bbaf6e2c5d5aa2 /src
parentd32c036d00e18d020d162fed7cb09b94b346e2d3 (diff)
downloadDLT-daemon-ed8354ff0255061222e35b81a9cc156ec3b056ae.tar.gz
client: Fix Get Log Info response conversion method (#422)
Signed-off-by: Andrei-Mircea Rusu <andrei-mircea.rusu@continental-corporation.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/dlt_client.c5
-rw-r--r--src/shared/dlt_common.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/dlt_client.c b/src/lib/dlt_client.c
index af380e4..552ee7a 100644
--- a/src/lib/dlt_client.c
+++ b/src/lib/dlt_client.c
@@ -1211,6 +1211,7 @@ DLT_STATIC void dlt_client_free_calloc_failed_get_log_info(DltServiceGetLogInfoR
free(resp->log_info_type.app_ids);
resp->log_info_type.app_ids = NULL;
+ resp->log_info_type.count_app_ids = 0;
return;
}
@@ -1331,7 +1332,7 @@ DltReturnValue dlt_client_parse_get_log_info_resp_text(DltServiceGetLogInfoRespo
con->context_description = (char *)calloc
((size_t) (con->len_context_description + 1), sizeof(char));
- if (con->context_description == 0) {
+ if (con->context_description == NULL) {
dlt_vlog(LOG_ERR, "%s: calloc failed for context description\n", __func__);
dlt_client_free_calloc_failed_get_log_info(resp, i);
return DLT_RETURN_ERROR;
@@ -1351,7 +1352,7 @@ DltReturnValue dlt_client_parse_get_log_info_resp_text(DltServiceGetLogInfoRespo
app->app_description = (char *)calloc
((size_t) (app->len_app_description + 1), sizeof(char));
- if (app->app_description == 0) {
+ if (app->app_description == NULL) {
dlt_vlog(LOG_ERR, "%s: calloc failed for application description\n", __func__);
dlt_client_free_calloc_failed_get_log_info(resp, i);
return DLT_RETURN_ERROR;
diff --git a/src/shared/dlt_common.c b/src/shared/dlt_common.c
index 4dfbc20..6737251 100644
--- a/src/shared/dlt_common.c
+++ b/src/shared/dlt_common.c
@@ -4062,7 +4062,7 @@ int16_t dlt_getloginfo_conv_ascii_to_uint16_t(char *rp, int *rp_count)
num_work[4] = 0;
*rp_count += 6;
- return (unsigned char)strtol(num_work, &endptr, 16);
+ return (uint16_t)strtol(num_work, &endptr, 16);
}
int16_t dlt_getloginfo_conv_ascii_to_int16_t(char *rp, int *rp_count)