From patchwork Sat Aug 12 12:04:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 800907 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xV10w1tlNz9t3C for ; Sat, 12 Aug 2017 22:10:40 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752685AbdHLMKi (ORCPT ); Sat, 12 Aug 2017 08:10:38 -0400 Received: from orbyte.nwl.cc ([151.80.46.58]:46325 "EHLO mail.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752165AbdHLMKg (ORCPT ); Sat, 12 Aug 2017 08:10:36 -0400 Received: from mail.nwl.cc (orbyte.nwl.cc [127.0.0.1]) by mail.nwl.cc (Postfix) with ESMTP id E216A683DD; Sat, 12 Aug 2017 14:10:35 +0200 (CEST) Received: from xsao (localhost [IPv6:::1]) by mail.nwl.cc (Postfix) with ESMTP id C620568252; Sat, 12 Aug 2017 14:10:35 +0200 (CEST) From: Phil Sutter To: Stephen Hemminger Cc: netdev@vger.kernel.org Subject: [iproute PATCH 02/51] devlink: No need for this self-assignment Date: Sat, 12 Aug 2017 14:04:21 +0200 Message-Id: <20170812120510.28750-3-phil@nwl.cc> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170812120510.28750-1-phil@nwl.cc> References: <20170812120510.28750-1-phil@nwl.cc> X-Virus-Scanned: ClamAV using ClamSMTP Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org dl_argv_handle_both() will either assign to handle_bit or error out in which case the variable is not used by the caller. Signed-off-by: Phil Sutter --- devlink/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devlink/devlink.c b/devlink/devlink.c index de41a9f4aae10..9fb3c7d2a91e9 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -787,7 +787,7 @@ static int dl_argv_parse(struct dl *dl, uint32_t o_required, int err; if (o_required & DL_OPT_HANDLE && o_required & DL_OPT_HANDLEP) { - uint32_t handle_bit = handle_bit; + uint32_t handle_bit; err = dl_argv_handle_both(dl, &opts->bus_name, &opts->dev_name, &opts->port_index, &handle_bit);