From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 4/5] examples_ip_pipeline: remove useless code Date: Mon, 31 Aug 2015 18:59:05 -0700 Message-ID: <1441072746-29174-5-git-send-email-stephen@networkplumber.org> References: <1441072746-29174-1-git-send-email-stephen@networkplumber.org> Cc: dev@dpdk.org To: cristian.dumitrescu@intel.com Return-path: Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by dpdk.org (Postfix) with ESMTP id 4613A8D95 for ; Tue, 1 Sep 2015 03:59:01 +0200 (CEST) Received: by pacgr6 with SMTP id gr6so7218752pac.3 for ; Mon, 31 Aug 2015 18:59:00 -0700 (PDT) In-Reply-To: <1441072746-29174-1-git-send-email-stephen@networkplumber.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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(¶m->burst_read, -- 2.1.4