diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2019-08-13 10:14:32 -0400 |
---|---|---|
committer | Patrice Buriez <patrice.buriez@intel.com> | 2019-10-08 19:21:34 +0000 |
commit | fb0c44a8e62de7cf06a1ad0c025ac7ecb39cad27 (patch) | |
tree | 4eca4ee386a0de23dc1028a37d90ce2c731f1798 /VNFs/DPPD-PROX/cfgfile.c | |
parent | d3552eafaca34771734258f3ff6f4f5f819e72bd (diff) |
Support for recent GCC compiler
This is required for instance on gcc (GCC) 8.2.1 20180905
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Change-Id: Id86de5d39d77c5cbf168cc51434f436f84376a4c
Diffstat (limited to 'VNFs/DPPD-PROX/cfgfile.c')
-rw-r--r-- | VNFs/DPPD-PROX/cfgfile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/VNFs/DPPD-PROX/cfgfile.c b/VNFs/DPPD-PROX/cfgfile.c index b15fc0ad..dc225075 100644 --- a/VNFs/DPPD-PROX/cfgfile.c +++ b/VNFs/DPPD-PROX/cfgfile.c @@ -26,6 +26,7 @@ #include "parse_utils.h" #include "log.h" #include "quit.h" +#include "prox_compat.h" #define UINT32_MAX_STR "4294967295" @@ -195,7 +196,7 @@ static struct cfg_section *cfg_check_section(char *buffer, struct cfg_section *p if (parse_vars(val, sizeof(val), pend)) return NULL; } else - strncpy(val, pend, sizeof(val)); + prox_strncpy(val, pend, sizeof(val)); for (len = 0; val[len] != '\0'; ++len) { if (strchr(valid, val[len]) == NULL) { @@ -275,7 +276,7 @@ int cfg_parse(struct cfg_file *pcfg, struct cfg_section *psec) ret = fgets(buffer, sizeof(buffer), pcfg->pfile); if (ret && *ret != '[') { size_t l = strlen(buffer); - strncpy(lines, buffer, max_len); + prox_strncpy(lines, buffer, max_len); max_len -= l; lines += l; } @@ -299,7 +300,7 @@ int cfg_parse(struct cfg_file *pcfg, struct cfg_section *psec) } while (cfg_get_line(pcfg, buffer, MAX_CFG_STRING_LEN, psec->raw_lines) > 0) { - strncpy(pcfg->cur_line, buffer, sizeof(pcfg->cur_line)); + prox_strncpy(pcfg->cur_line, buffer, sizeof(pcfg->cur_line)); if (*buffer == '[') { if (index_count + 1 < psec->nbindex) { // Need to loop - go back to recorded postion in file |