[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20121109.022520.1078854628056136345.davem@davemloft.net>
Date: Fri, 09 Nov 2012 02:25:20 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: mankad.maulik@...il.com
Cc: ming.lei@...onical.com, gregkh@...uxfoundation.org,
oneukum@...e.de, netdev@...r.kernel.org, linux-usb@...r.kernel.org
Subject: Re: [PATCH v4 3/5] usbnet: smsc95xx: fix memory leak in
smsc95xx_suspend
From: Maulik Mankad <mankad.maulik@...il.com>
Date: Fri, 9 Nov 2012 12:28:17 +0530
> We don't need memset() here.
> May be command[2] = {0}; offset[2] = {0}; crc[4] = {0}; is enough.
The compiler can see this an will eliminate the unnecessary
clears.
So it's better to use memset and make the code much clearer
and easier to audit.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists