This memchr() will never return NULL because rte_cfgfile_load() function will skip lines without useful content.
Fixes: 74e0d3a17461 ("cfgfile: fix null pointer dereference in parsing") Cc: sta...@dpdk.org Signed-off-by: Chengwen Feng <fengcheng...@huawei.com> --- lib/cfgfile/rte_cfgfile.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/cfgfile/rte_cfgfile.c b/lib/cfgfile/rte_cfgfile.c index 6a5e4fd942..d7aa38b56f 100644 --- a/lib/cfgfile/rte_cfgfile.c +++ b/lib/cfgfile/rte_cfgfile.c @@ -223,12 +223,6 @@ rte_cfgfile_load_with_params(const char *filename, int flags, split[0] = buffer; split[1] = memchr(buffer, '=', len); - if (split[1] == NULL) { - CFG_LOG(ERR, - "line %d - no '=' character found", - lineno); - goto error1; - } *split[1] = '\0'; split[1]++; -- 2.17.1