From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FFkBMsobLe2jclK0Da1LVlTlvqHJgoFIzV/Xg1lxsuw=; b=frsC/h6aqvXdxq8YVfpNPPZZMM33vN1GRB1/vl/MYa1oiVA14y9DRPzocN/BwqVInx /qypYBXIrBV/8Faxe91TzOeMLVQT+K1sMZ8RRR6sGTV8BC0v8BSWg3Ob2FH0EB/vcPwC AXDQevH8SJ9afEZaG5j3K9BOWZ3rLmUkvoGjGhfUE7J/EFRpVvxpoBhsuQ5wVTBRB8Xg B8nLagSI0RDF2mZ7UZbAJC3UdXV6SXwwYH3+SIB9JtyFJD8DuitLanZaxMUaI7PQyz1i 3ynIv118fsK1HnX9LRM2h/BvaA2xTimzV5Xt6S8rpNF/tagrCMGSNyDzZlIravni3DF0 lclQ== X-Gm-Message-State: ALoCoQkOO0YXrtKM/aFE8zLiYN2ta5wbd/CB51Wl0vFMpVFbDk4Q+TBZHWAvTC503aMYKaFs7IaI X-Received: by 10.68.98.5 with SMTP id ee5mr42721898pbb.95.1441072740609; Mon, 31 Aug 2015 18:59:00 -0700 (PDT) Received: from urahara.home.lan (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by smtp.gmail.com with ESMTPSA id ld8sm15988418pbc.61.2015.08.31.18.58.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Aug 2015 18:58:59 -0700 (PDT) From: Stephen Hemminger To: cristian.dumitrescu@intel.com Date: Mon, 31 Aug 2015 18:59:05 -0700 Message-Id: <1441072746-29174-5-git-send-email-stephen@networkplumber.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1441072746-29174-1-git-send-email-stephen@networkplumber.org> References: <1441072746-29174-1-git-send-email-stephen@networkplumber.org> Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH 4/5] examples_ip_pipeline: remove useless code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2015 01:59:02 -0000 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