summaryrefslogtreecommitdiff
path: root/src/gateway
diff options
context:
space:
mode:
authorSebastian Lipponer <mail@sebastianlipponer.de>2019-11-25 08:22:11 +0100
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2019-11-25 16:22:11 +0900
commitcd040a4ce1ea3d2008048083a862461596cd2cd2 (patch)
tree9962ef9fd7ff7627322f34dbfd83614b7d8e6ec9 /src/gateway
parent346781ff633aee48eee5700a0b379d97cf86c935 (diff)
downloadDLT-daemon-cd040a4ce1ea3d2008048083a862461596cd2cd2.tar.gz
Change the DLT_CHECK_RCV_DATA_SIZE macro to an internal function (#191)
The use of this macro in a if condition is actually non-standard C++ code. GCC issues a warning that ISO C++ forbids braced-groups within expressions when compiled with -Wpedantic. Other compilers fail with an error. Change the macro to an internal function in order to improve the portability to other platforms (i.e. MSVC, proprietary embedded). Signed-off-by: Sebastian Lipponer <mail@sebastianlipponer.de>
Diffstat (limited to 'src/gateway')
-rw-r--r--src/gateway/dlt_gateway.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gateway/dlt_gateway.c b/src/gateway/dlt_gateway.c
index 4c006f5..57d801b 100644
--- a/src/gateway/dlt_gateway.c
+++ b/src/gateway/dlt_gateway.c
@@ -971,7 +971,7 @@ DLT_STATIC DltReturnValue dlt_gateway_parse_get_log_info(DltDaemon *daemon,
return DLT_RETURN_WRONG_PARAMETER;
}
- if (DLT_CHECK_RCV_DATA_SIZE(msg->datasize, sizeof(DltServiceGetLogInfoResponse)) < 0)
+ if (dlt_check_rcv_data_size(msg->datasize, sizeof(DltServiceGetLogInfoResponse)) < 0)
return DLT_RETURN_ERROR;
/* if the request was send from gateway, clear all application and context list */
@@ -1093,7 +1093,7 @@ DLT_STATIC int dlt_gateway_parse_get_default_log_level(DltDaemon *daemon,
return DLT_RETURN_WRONG_PARAMETER;
}
- if (DLT_CHECK_RCV_DATA_SIZE(msg->datasize,
+ if (dlt_check_rcv_data_size(msg->datasize,
sizeof(DltServiceGetDefaultLogLevelResponse)) < 0) {
dlt_log(LOG_ERR, "Received data incomplete.\n");
return DLT_RETURN_ERROR;