Return-path: Received: from mout.web.de ([212.227.17.11]:50277 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752969AbcGZG0X (ORCPT ); Tue, 26 Jul 2016 02:26:23 -0400 Subject: Re: staging: wilc1000: Reduce scope for a few variables in mac_ioctl() To: Lino Sanfilippo References: <1c4cac35-dded-ea88-45aa-3f8ac098289d@gmx.de> Cc: LKML , kernel-janitors@vger.kernel.org, linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org, Greg Kroah-Hartman , Steve Caldwell From: SF Markus Elfring Message-ID: (sfid-20160726_082645_670008_4D312DC8) Date: Tue, 26 Jul 2016 08:25:54 +0200 MIME-Version: 1.0 In-Reply-To: <1c4cac35-dded-ea88-45aa-3f8ac098289d@gmx.de> Content-Type: text/plain; charset=utf-8 Sender: linux-wireless-owner@vger.kernel.org List-ID: >> - if (strncasecmp(buff, "RSSI", length) == 0) { >> + if (strncasecmp(buff, "RSSI", 0) == 0) { >> + s8 rssi; >> + > > Um, please think a second about if it makes any sense at all to compare > zero chars of two strings. Under which circumstances should the variable "length" contain an other value than zero? How can this open issue be fixed better? Regards, Markus