From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id F20995AA1 for ; Thu, 26 Mar 2015 17:00:03 +0100 (CET) Received: by wgra20 with SMTP id a20so69193778wgr.3 for ; Thu, 26 Mar 2015 09:00:03 -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=mzkYfO/FgDofnxNoNJh4sCDfCJUCekNN1az+5o8t2sA=; b=aavpYLwNdODGSOvWWjWp9Tv35mMq9HQD0aN7rDMWuKzhp0A9GHH75vzeSVL/X6SHg1 NdUK8ZRVlMPl/Foi5bdaobM+ymWuq9F442HUOLBzUsz8FSHAns2c9m35SnBISn3QVurz AhYF3SNGRRgw8Yfw/AYlZTcMWCULtlAw3OJ0Guz6JBKUFUd3XNfJy8F46nL0M/XgnwCC VIcamwH2NnAsZZeRjqnJySAQ+tpVxeKsTBwh3F56PGaYteQNgNCT9oL3IWqcl562tqB+ URloOPWVikb9xX16gAtp1zSkVh9QBmnXJFl2iNseQKgRAA49WuYEfycOuw8GpYbBBmV2 r86g== X-Gm-Message-State: ALoCoQmmvltze4ptxz+IS4ThSxtSwcUZaY/9BKTkpXhqJ5rNfDQr8TCVh0fFxxARmfc645o3C+3X X-Received: by 10.180.79.232 with SMTP id m8mr3907338wix.81.1427385603827; Thu, 26 Mar 2015 09:00:03 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id i3sm2797619wiy.23.2015.03.26.09.00.03 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Mar 2015 09:00:03 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Thu, 26 Mar 2015 16:59:53 +0100 Message-Id: <1427385595-15011-4-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427385595-15011-1-git-send-email-olivier.matz@6wind.com> References: <1427302838-8285-1-git-send-email-olivier.matz@6wind.com> <1427385595-15011-1-git-send-email-olivier.matz@6wind.com> Cc: zoltan.kiss@linaro.org Subject: [dpdk-dev] [PATCH v2 3/5] test/mbuf: rename mc variable in m 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: Thu, 26 Mar 2015 16:00:04 -0000 It's better to name the mbuf 'm' instead of 'mc' as it's not a clone. Signed-off-by: Olivier Matz --- app/test/test_mbuf.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 1ff66cb..9a3cf8f 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -321,43 +321,42 @@ fail: static int testclone_testupdate_testdetach(void) { - struct rte_mbuf *mc = NULL; + struct rte_mbuf *m = NULL; struct rte_mbuf *clone = NULL; /* alloc a mbuf */ - - mc = rte_pktmbuf_alloc(pktmbuf_pool); - if (mc == NULL) + m = rte_pktmbuf_alloc(pktmbuf_pool); + if (m == NULL) GOTO_FAIL("ooops not allocating mbuf"); - if (rte_pktmbuf_pkt_len(mc) != 0) + if (rte_pktmbuf_pkt_len(m) != 0) GOTO_FAIL("Bad length"); /* clone the allocated mbuf */ - clone = rte_pktmbuf_clone(mc, pktmbuf_pool); + clone = rte_pktmbuf_clone(m, pktmbuf_pool); if (clone == NULL) GOTO_FAIL("cannot clone data\n"); rte_pktmbuf_free(clone); - mc->next = rte_pktmbuf_alloc(pktmbuf_pool); - if(mc->next == NULL) + m->next = rte_pktmbuf_alloc(pktmbuf_pool); + if (m->next == NULL) GOTO_FAIL("Next Pkt Null\n"); - clone = rte_pktmbuf_clone(mc, pktmbuf_pool); + clone = rte_pktmbuf_clone(m, pktmbuf_pool); if (clone == NULL) GOTO_FAIL("cannot clone data\n"); /* free mbuf */ - rte_pktmbuf_free(mc); + rte_pktmbuf_free(m); rte_pktmbuf_free(clone); - mc = NULL; + m = NULL; clone = NULL; return 0; fail: - if (mc) - rte_pktmbuf_free(mc); + if (m) + rte_pktmbuf_free(m); return -1; } #undef GOTO_FAIL -- 2.1.4