Skip to content

Commit

Permalink
Fix compile error stringop-truncation with GCC 9.4
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Methner <mmethner@de.adit-jv.com>
  • Loading branch information
Michael Methner committed Jun 14, 2023
1 parent 0db05d0 commit d6bb6b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/console/dlt-control-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ void set_ecuid(char *ecuid)
if (dlt_parse_config_param("ECUId", &ecuid_conf) == 0) {
memset(local_ecuid, 0, DLT_CTRL_ECUID_LEN);
strncpy(local_ecuid, ecuid_conf, DLT_CTRL_ECUID_LEN);
local_ecuid[DLT_CTRL_ECUID_LEN -1] = '\0';
if (ecuid_conf !=NULL)
free(ecuid_conf);
local_ecuid[DLT_CTRL_ECUID_LEN - 1] = '\0';
}
else {
pr_error("Cannot read ECUid from dlt.conf\n");
Expand Down

0 comments on commit d6bb6b6

Please sign in to comment.