From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by dpdk.org (Postfix) with ESMTP id 078D6C392 for ; Mon, 20 Apr 2015 17:41:56 +0200 (CEST) Received: by wicmx19 with SMTP id mx19so43093831wic.1 for ; Mon, 20 Apr 2015 08:41:55 -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=DfVQMGhl7YdNi80LQn8wdtXNXTJV4cP4+6HMgHWHYk4=; b=a0bNIlvxgnyp1cBFCnROhJZQgI/XJvtfY4GkjDi4JfDhrUBtgF15GFvKtiWcrEzYjn EEV98/LkcoCAfSNH2hc8fVgOa80joGkNmLDf6tDR2XUN3OchRxqTq9VyibNTNktjbDgR EupYv94C9P6naOG9sDoNEn4EBRZoOd24QjAACk3gL6APKwslIYRapCyHuESWvJMgea2Y VVe1Bywzc45jTaVVzLnQAdbDoIDCbwrj55awmuXF7I2btyzZUvWSWFOt5aASM1hS5QsN 4HM+qipMSD+NIJJVzPHx5XcCRd0p0fxRgxQPSSTk0wbiD27omlN20tgdvQa1RkEWJu5+ AAQg== X-Gm-Message-State: ALoCoQl0eo26QTA8V3RaZc46GFyeO5Pgdtl8MbP+tZWajRL+JsfHAijPrM0bocZjVYJTLxJvoKvT X-Received: by 10.180.99.231 with SMTP id et7mr26737384wib.23.1429544515929; Mon, 20 Apr 2015 08:41:55 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id fm8sm11258951wib.9.2015.04.20.08.41.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Apr 2015 08:41:55 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Mon, 20 Apr 2015 17:41:34 +0200 Message-Id: <1429544496-22532-11-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1429544496-22532-1-git-send-email-olivier.matz@6wind.com> References: <1427829784-12323-2-git-send-email-zer0@droids-corp.org> <1429544496-22532-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH v4 10/12] 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: Mon, 20 Apr 2015 15:41:56 -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 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