Code here checks return from strdup() in only one place in this
whole module, and then does nothing useful by setting one
value that is then cleared. Just remove the check.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 examples/ip_pipeline/config_parse.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/examples/ip_pipeline/config_parse.c 
b/examples/ip_pipeline/config_parse.c
index 6b651a8..81ec33b 100644
--- a/examples/ip_pipeline/config_parse.c
+++ b/examples/ip_pipeline/config_parse.c
@@ -1483,9 +1483,6 @@ parse_tm(struct app_params *app,
                ret = -ESRCH;
                if (strcmp(ent->name, "cfg") == 0) {
                        param->file_name = strdup(ent->value);
-                       if (param->file_name == NULL)
-                               ret = -EINVAL;
-
                        ret = 0;
                } else if (strcmp(ent->name, "burst_read") == 0)
                        ret = parser_read_uint32(&param->burst_read,
-- 
2.1.4

Reply via email to