From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f171.google.com (mail-wi0-f171.google.com [209.85.212.171]) by dpdk.org (Postfix) with ESMTP id 719F5C3BE for ; Tue, 21 Apr 2015 11:55:56 +0200 (CEST) Received: by widdi4 with SMTP id di4so132308095wid.0 for ; Tue, 21 Apr 2015 02:55:56 -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=Q5AUXOqxtzOR8yBImZmG0lzJxsrg8XvB224ypXCpsFDySXLnsbv3QSfuqsaFOB/T5t s940yfUGBrf4fGubgM6ruxBwmuPkANb7mGGHopiAI3bqPHVPopLeicGjQgCUomHZQ0nA 3kj0GWwMS3yC6wweMUHOSovnSH6Hi8RqoFKVNRKiC/rQ/i9PtyL8OFSz23K3o9lsxibw 5/Q6HRjsnuCR+ggu8cOjypSis7CanDXeYNYrOfAG0mso1hEKjg85AEaCV52GH5x/FkBz +m75ofiT2VpMuU4E0QTlgD3a1AYbbSLOBvd3VsUW5kjTgMD6Vwtvyy5fW1Xwxr4jyDDt PnwA== X-Gm-Message-State: ALoCoQk5QxE2E9Z086bYxvRZuROgEQlyEwHF78wyKbo5u/p2EEZLX0uuJkXQNydJHNUfGJZzAObb X-Received: by 10.180.93.36 with SMTP id cr4mr4109790wib.61.1429610156368; Tue, 21 Apr 2015 02:55:56 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id i6sm1855867wjf.29.2015.04.21.02.55.55 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Apr 2015 02:55:55 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Tue, 21 Apr 2015 11:55:20 +0200 Message-Id: <1429610122-30943-11-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1429610122-30943-1-git-send-email-olivier.matz@6wind.com> References: <1429544496-22532-1-git-send-email-olivier.matz@6wind.com> <1429610122-30943-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH v5 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: Tue, 21 Apr 2015 09:55: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