summaryrefslogtreecommitdiff
path: root/src/daemon
diff options
context:
space:
mode:
authorPhong Tran <tranmanphong@gmail.com>2018-03-29 13:51:29 +0700
committerManikandanChockalingam <manikandan.chockalingam@in.bosch.com>2018-03-29 12:21:29 +0530
commit90c8b5b2890a227088b5a67a21bdc24028b156d5 (patch)
treeeb8fea77da9090e94ada870fa8519ce479e18e58 /src/daemon
parentb3b7f98bff66d8235474f68004f7b767835b8e3e (diff)
downloadDLT-daemon-90c8b5b2890a227088b5a67a21bdc24028b156d5.tar.gz
minor compiler warning gcc 7.x (#30)
* Fix -Wpointer-compare of compare with null char Signed-off-by: Phong Tran <tranmanphong@gmail.com> * dlt_common: fix -Wformat-truncation of snprintf Avoid snprintf output truncation by handling return value Signed-off-by: Phong Tran <tranmanphong@gmail.com> * dlt_offline_trace: Fix Wformat-truncation of snprintf Compile with Gcc 7.x has the warning of snprintf buffer length size. Check return value of snprintf() for avoiding the warning. Signed-off-by: Phong Tran <tranmanphong@gmail.com> * dlt_common_test: Fix memleak t_dlt_message_read some resources were not free after using. Detected by running valgrind --leak-check=full ./gtest_dlt_common Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Diffstat (limited to 'src/daemon')
-rw-r--r--src/daemon/dlt_daemon_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/daemon/dlt_daemon_common.c b/src/daemon/dlt_daemon_common.c
index 096708c..11be6e6 100644
--- a/src/daemon/dlt_daemon_common.c
+++ b/src/daemon/dlt_daemon_common.c
@@ -596,7 +596,7 @@ int dlt_daemon_applications_save(DltDaemon *daemon, const char *filename, int ve
dlt_set_id(apid,daemon->applications[i].apid);
if ((daemon->applications[i].application_description) &&
- (daemon->applications[i].application_description!='\0'))
+ (daemon->applications[i].application_description[0] != '\0'))
{
fprintf(fd,"%s:%s:\n",apid, daemon->applications[i].application_description);
}