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/log.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/log.c')
-rw-r--r-- | VNFs/DPPD-PROX/log.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/VNFs/DPPD-PROX/log.c b/VNFs/DPPD-PROX/log.c index 7049a5e3..56338f89 100644 --- a/VNFs/DPPD-PROX/log.c +++ b/VNFs/DPPD-PROX/log.c @@ -29,6 +29,7 @@ #include "defaults.h" #include "etypes.h" #include "prox_cfg.h" +#include "prox_compat.h" static pthread_mutex_t file_mtx = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; int log_lvl = PROX_MAX_LOG_LVL; @@ -56,7 +57,7 @@ const char *get_warning(int i) static void store_warning(const char *warning) { - strncpy(last_warn[n_warnings % 5], warning, sizeof(last_warn[0])); + prox_strncpy(last_warn[n_warnings % 5], warning, sizeof(last_warn[0])); n_warnings++; } @@ -69,10 +70,10 @@ void plog_init(const char *log_name, int log_name_pid) if (log_name_pid) snprintf(buf, sizeof(buf), "%s-%u.log", "prox", getpid()); else - strncpy(buf, "prox.log", sizeof(buf)); + prox_strncpy(buf, "prox.log", sizeof(buf)); } else { - strncpy(buf, log_name, sizeof(buf)); + prox_strncpy(buf, log_name, sizeof(buf)); } fp = fopen(buf, "w"); |