From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0189AA034F; Tue, 30 Mar 2021 12:19:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5B97B140DCA; Tue, 30 Mar 2021 12:19:07 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 8FBFE40691 for ; Tue, 30 Mar 2021 12:19:06 +0200 (CEST) IronPort-SDR: jnthHG1iXXeOTEaKH4xcmsh1cgQFVhnqbyBURlyS4W5A317hJxfxUCIEsw20aJmUgC4oH0OJdv tVAw1U70Fdog== X-IronPort-AV: E=McAfee;i="6000,8403,9938"; a="188470829" X-IronPort-AV: E=Sophos;i="5.81,290,1610438400"; d="scan'208";a="188470829" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2021 03:19:05 -0700 IronPort-SDR: u9OSp3ePWyLeHTwRzTQn2HixPf5kg0uu8TBmq3vtLrNXo0w/Pfj+7Xnz9N5j7ESp/9K61RjRX4 G/yoMTPGzTew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,290,1610438400"; d="scan'208";a="445062025" Received: from silpixa00400573.ir.intel.com (HELO silpixa00400573.ger.corp.intel.com) ([10.237.223.107]) by fmsmga002.fm.intel.com with ESMTP; 30 Mar 2021 03:19:04 -0700 From: Cristian Dumitrescu To: dev@dpdk.org Date: Tue, 30 Mar 2021 11:19:04 +0100 Message-Id: <20210330101904.58023-1-cristian.dumitrescu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH] pipeline: adjust error code for internal function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Adjusting the error code for the internal function instruction_config to match the rest of the code which is returning a negative value on error. Cosmetic change. Signed-off-by: Cristian Dumitrescu --- lib/librte_pipeline/rte_swx_pipeline.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c index 48ac250c1..f46f90c34 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.c +++ b/lib/librte_pipeline/rte_swx_pipeline.c @@ -8049,20 +8049,20 @@ instruction_config(struct rte_swx_pipeline *p, /* Memory allocation. */ instr = calloc(n_instructions, sizeof(struct instruction)); if (!instr) { - err = ENOMEM; + err = -ENOMEM; goto error; } data = calloc(n_instructions, sizeof(struct instruction_data)); if (!data) { - err = ENOMEM; + err = -ENOMEM; goto error; } for (i = 0; i < n_instructions; i++) { char *string = strdup(instructions[i]); if (!string) { - err = ENOMEM; + err = -ENOMEM; goto error; } -- 2.17.1