[1/4] cfgfile: remove dead code
Checks
Commit Message
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: stable@dpdk.org
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
lib/cfgfile/rte_cfgfile.c | 6 ------
1 file changed, 6 deletions(-)
Comments
On Tue, 20 Feb 2024 03:58:37 +0000
Chengwen Feng <fengchengwen@huawei.com> wrote:
> 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: stable@dpdk.org
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
LGTM
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
@@ -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]++;