summaryrefslogtreecommitdiff
path: root/src/daemon/dlt_daemon_offline_logstorage.c
diff options
context:
space:
mode:
authorFelix Herrmann <fherrmann@de.adit-jv.com>2020-01-13 10:40:25 +0100
committerSaya Sugiura <39760799+ssugiura@users.noreply.github.com>2020-07-06 10:04:07 +0900
commit676e8fc1ba927dc84df82b508d796e31d9fd120c (patch)
tree141271d339f1ba68d0b29fd124e8eaa5d3d99fd4 /src/daemon/dlt_daemon_offline_logstorage.c
parentec391decd94ac9f6c6133c24a41c8afb2c01623f (diff)
downloadDLT-daemon-676e8fc1ba927dc84df82b508d796e31d9fd120c.tar.gz
fix some gcc9 compiler warnings
Many stringop-truncation and stringop-overflow warnings are still there (so many). https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/ Signed-off-by: Felix Herrmann <fherrmann@de.adit-jv.com> Signed-off-by: KHANH LUONG HONG DUY <khanh.luonghongduy@vn.bosch.com>
Diffstat (limited to 'src/daemon/dlt_daemon_offline_logstorage.c')
-rw-r--r--src/daemon/dlt_daemon_offline_logstorage.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/daemon/dlt_daemon_offline_logstorage.c b/src/daemon/dlt_daemon_offline_logstorage.c
index 4e9c6c6..0b3c14f 100644
--- a/src/daemon/dlt_daemon_offline_logstorage.c
+++ b/src/daemon/dlt_daemon_offline_logstorage.c
@@ -49,9 +49,9 @@ DLT_STATIC DltReturnValue dlt_logstorage_split_ecuid(char *key,
if ((len > (DLT_ID_SIZE + 2)) || (len < 2))
return DLT_RETURN_ERROR;
- strncpy(ecuid, key, (len - 2));
- strncpy(apid, ".*", 2);
- strncpy(ctid, ".*", 2);
+ memcpy(ecuid, key, (len - 2));
+ memcpy(apid, ".*", 2);
+ memcpy(ctid, ".*", 2);
return DLT_RETURN_OK;
}
@@ -76,7 +76,7 @@ DLT_STATIC DltReturnValue dlt_logstorage_split_ctid(char *key,
return DLT_RETURN_ERROR;
strncpy(ctid, (key + 2), (len - 1));
- strncpy(apid, ".*", 2);
+ memcpy(apid, ".*", 2);
return DLT_RETURN_OK;
}
@@ -101,7 +101,7 @@ DLT_STATIC DltReturnValue dlt_logstorage_split_apid(char *key,
return DLT_RETURN_ERROR;
strncpy(apid, key + 1, (len - 2));
- strncpy(ctid, ".*", 2);
+ memcpy(ctid, ".*", 2);
return DLT_RETURN_OK;
}
@@ -183,7 +183,7 @@ DLT_STATIC DltReturnValue dlt_logstorage_split_ecuid_apid(char *key,
else
return DLT_RETURN_ERROR;
- strncpy(ctid, ".*", 2);
+ memcpy(ctid, ".*", 2);
return DLT_RETURN_OK;
}
@@ -227,7 +227,7 @@ DLT_STATIC DltReturnValue dlt_logstorage_split_multi(char *key,
if (tok != NULL)
strncpy(ctid, tok, DLT_ID_SIZE);
- strncpy(apid, ".*", 2);
+ memcpy(apid, ".*", 2);
}
else {
strncpy(ecuid, tok, DLT_ID_SIZE);