From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id A699CC370 for ; Wed, 22 Apr 2015 11:57:53 +0200 (CEST) Received: by wgyo15 with SMTP id o15so240980243wgy.2 for ; Wed, 22 Apr 2015 02:57:53 -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=LYuXFF+tiLn3NfnW1Az8iP9CQv8k0gCoGFgaQdw96Jo=; b=kZfFU7A7CFFhZJE9S2XMga2G9zKqVkiuc+4sygHR7qssZN3ftZybDg5DO4w9c7w3li npQA8DXoKwpPhbJbmAVeG1zcfuvgmBs4IYDwvPK72LhYjX4me9415a+jqExiSzKW3L1F wnR0wUs5WQ4PyXHJ19fxP4gvtZU2PsdrsvqFzwvpFZEZNGi6aX4TpHPJa6TbiQN6dlSb oeFRGfCmLQjwNoAPUzFoDoIyJahrqN5/RgI3Z9nUhi6NZ/HDQXY7e5RbRzTRwmM9uguI vuBaugCdHEE3Z+GpYVuKTJysXgC3BH30b69b8ZHcuxfAeND8kl7LUB2qi59mJ0pbIfRK /NSg== X-Gm-Message-State: ALoCoQmBMPA0epWdiHNLxkluq0xPRde8SCJnfXiMjYxgyIIygDeOian4lUzz+Bv61reTL3dvqmrT X-Received: by 10.194.175.70 with SMTP id by6mr50493333wjc.42.1429696673595; Wed, 22 Apr 2015 02:57:53 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id yr1sm6570006wjc.37.2015.04.22.02.57.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Apr 2015 02:57:53 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Wed, 22 Apr 2015 11:57:27 +0200 Message-Id: <1429696650-9043-11-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1429696650-9043-1-git-send-email-olivier.matz@6wind.com> References: <1429610122-30943-1-git-send-email-olivier.matz@6wind.com> <1429696650-9043-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH v6 10/13] 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: Wed, 22 Apr 2015 09:57:53 -0000 It's better to name the mbuf 'm' instead of 'mc' as it's not a clone. Signed-off-by: Olivier Matz Acked-by: Neil Horman --- 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 4774263..2614598 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -320,43 +320,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