lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <db761c03-3e90-4284-2652-a5516b372a32@users.sourceforge.net>
Date:   Thu, 12 Oct 2017 12:47:05 +0200
From:   SF Markus Elfring <elfring@...rs.sourceforge.net>
To:     devel@...verdev.osuosl.org, netdev@...r.kernel.org,
        Al Viro <viro@...iv.linux.org.uk>,
        Corentin Labbe <clabbe.montjoie@...il.com>,
        David Howells <dhowells@...hat.com>,
        "David S. Miller" <davem@...emloft.net>,
        Georgiana Chelu <georgiana.chelu93@...il.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Johannes Berg <johannes.berg@...el.com>,
        Julia Lawall <julia.lawall@...6.fr>,
        Samuel Ortiz <samuel@...tiz.org>,
        Srishti Sharma <srishtishar@...il.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Yuan Linyu <Linyu.Yuan@...atel-sbell.com.cn>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org
Subject: [PATCH 07/10] staging/irda/net: Delete an unnecessary variable
 initialisation in four functions

From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 11 Oct 2017 22:26:00 +0200

The variable "tx_skb" will eventually be set to an appropriate pointer
a bit later. Thus omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
 drivers/staging/irda/net/irlap_frame.c | 6 +++---
 drivers/staging/irda/net/irttp.c       | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/irda/net/irlap_frame.c b/drivers/staging/irda/net/irlap_frame.c
index 25ceb06efd58..16fe7f53fdb7 100644
--- a/drivers/staging/irda/net/irlap_frame.c
+++ b/drivers/staging/irda/net/irlap_frame.c
@@ -258,7 +258,7 @@ void irlap_send_ua_response_frame(struct irlap_cb *self, struct qos_info *qos)
  */
 void irlap_send_dm_frame( struct irlap_cb *self)
 {
-	struct sk_buff *tx_skb = NULL;
+	struct sk_buff *tx_skb;
 	struct dm_frame *frame;
 
 	IRDA_ASSERT(self, return;);
@@ -288,7 +288,7 @@ void irlap_send_dm_frame( struct irlap_cb *self)
  */
 void irlap_send_disc_frame(struct irlap_cb *self)
 {
-	struct sk_buff *tx_skb = NULL;
+	struct sk_buff *tx_skb;
 	struct disc_frame *frame;
 
 	IRDA_ASSERT(self, return;);
@@ -315,7 +315,7 @@ void irlap_send_disc_frame(struct irlap_cb *self)
 void irlap_send_discovery_xid_frame(struct irlap_cb *self, int S, __u8 s,
 				    __u8 command, discovery_t *discovery)
 {
-	struct sk_buff *tx_skb = NULL;
+	struct sk_buff *tx_skb;
 	struct xid_frame *frame;
 	__u32 bcast = BROADCAST;
 	__u8 *info;
diff --git a/drivers/staging/irda/net/irttp.c b/drivers/staging/irda/net/irttp.c
index 2adba87aeb68..bc612227cdc3 100644
--- a/drivers/staging/irda/net/irttp.c
+++ b/drivers/staging/irda/net/irttp.c
@@ -811,7 +811,7 @@ static void irttp_run_tx_queue(struct tsap_cb *self)
  */
 static inline void irttp_give_credit(struct tsap_cb *self)
 {
-	struct sk_buff *tx_skb = NULL;
+	struct sk_buff *tx_skb;
 	unsigned long flags;
 	int n;
 
-- 
2.14.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ