From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by dpdk.org (Postfix) with ESMTP id 86E1E7EB0 for ; Tue, 31 Mar 2015 21:23:31 +0200 (CEST) Received: by wixo5 with SMTP id o5so14969154wix.1 for ; Tue, 31 Mar 2015 12:23:31 -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=XZzuZfR5FCyMgAcu/wCw5lkbAPcn1yJBUexkXJh/hIU=; b=N6GFqIwktmf4+yJ7S0q8Lc7JxtCfxJJiMlG3UZa1Er/nVK2Gasbk2WLT3m8lV/fKdu +txS6A91r1MHbyetnsWQkvOx4VYHN+4WisftwO8heLRzqXiZEFTdyhVhDdKiJxAMvREi FFpGqWpdtyh5N46y7stcebXBlw2FnO3Kp7qdrPoUe+tUiC8hPWuc031K5npCuPiLnb2f UbJQ1k8GtJSn9MWNbANlxZsIYmeJ84xDd2Y+kajp5GJ0Lfgx22gtQWKZHrbqFN4smN/J 6JtD3XY9cA13o63jAB7Q/T1q4+wwuIA0Dvvlh1sjeM4OhsvCDI4A83XcZoN6HW9mpbxy D66A== X-Gm-Message-State: ALoCoQnMHd50kBeANncS8gv1K24mtQbCj3902udVEEFcTCyCOJax+uZEPHKSXVWelskXqkJC3skU X-Received: by 10.180.101.233 with SMTP id fj9mr8028832wib.65.1427829811451; Tue, 31 Mar 2015 12:23:31 -0700 (PDT) Received: from localhost.localdomain ([185.65.185.242]) by mx.google.com with ESMTPSA id g2sm25966892wib.1.2015.03.31.12.23.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Mar 2015 12:23:31 -0700 (PDT) From: Olivier Matz X-Google-Original-From: Olivier Matz To: dev@dpdk.org Date: Tue, 31 Mar 2015 21:23:02 +0200 Message-Id: <1427829784-12323-4-git-send-email-zer0@droids-corp.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1427829784-12323-1-git-send-email-zer0@droids-corp.org> References: <1427385595-15011-1-git-send-email-olivier.matz@6wind.com> <1427829784-12323-1-git-send-email-zer0@droids-corp.org> Subject: [dpdk-dev] [PATCH v3 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: Tue, 31 Mar 2015 19:23:31 -0000 From: Olivier Matz 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