From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3357E4F9C; Wed, 10 Apr 2019 15:13:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 06:13:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="336617393" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.223.64]) by fmsmga005.fm.intel.com with ESMTP; 10 Apr 2019 06:13:54 -0700 From: David Hunt To: dev@dpdk.org Cc: david.hunt@intel.com, stable@dpdk.org Date: Wed, 10 Apr 2019 14:13:48 +0100 Message-Id: <20190410131348.25287-1-david.hunt@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] examples/vm_power_manager: fix unreachable code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2019 13:14:00 -0000 A for loop to MAX_VFS had a break as the last line, so the w++ would never get called, breaking out of the loop after the first iteration. Remove the break so that the loop can execute properly. Fixes: ace158c4a821 ("examples/vm_power: add check for port count") Coverity issue: 337682 Signed-off-by: David Hunt --- examples/vm_power_manager/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c index 893bf4cdd..9b11f66f9 100644 --- a/examples/vm_power_manager/main.c +++ b/examples/vm_power_manager/main.c @@ -390,7 +390,6 @@ main(int argc, char **argv) break; } printf("\n"); - break; } } } -- 2.17.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 278ECA0096 for ; Wed, 10 Apr 2019 15:14:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0DD1E5F3C; Wed, 10 Apr 2019 15:14:01 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 3357E4F9C; Wed, 10 Apr 2019 15:13:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2019 06:13:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,332,1549958400"; d="scan'208";a="336617393" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.223.64]) by fmsmga005.fm.intel.com with ESMTP; 10 Apr 2019 06:13:54 -0700 From: David Hunt To: dev@dpdk.org Cc: david.hunt@intel.com, stable@dpdk.org Date: Wed, 10 Apr 2019 14:13:48 +0100 Message-Id: <20190410131348.25287-1-david.hunt@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [PATCH v1] examples/vm_power_manager: fix unreachable code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190410131348.F0ebtG9S_auUc5l_eKlRo9cK-oQs41yVQn43T74-klA@z> A for loop to MAX_VFS had a break as the last line, so the w++ would never get called, breaking out of the loop after the first iteration. Remove the break so that the loop can execute properly. Fixes: ace158c4a821 ("examples/vm_power: add check for port count") Coverity issue: 337682 Signed-off-by: David Hunt --- examples/vm_power_manager/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/vm_power_manager/main.c b/examples/vm_power_manager/main.c index 893bf4cdd..9b11f66f9 100644 --- a/examples/vm_power_manager/main.c +++ b/examples/vm_power_manager/main.c @@ -390,7 +390,6 @@ main(int argc, char **argv) break; } printf("\n"); - break; } } } -- 2.17.1