From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753261AbcGYTcQ (ORCPT ); Mon, 25 Jul 2016 15:32:16 -0400 Received: from mx01-fr.bfs.de ([193.174.231.67]:39988 "EHLO mx01-fr.bfs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbcGYTcP (ORCPT ); Mon, 25 Jul 2016 15:32:15 -0400 Message-ID: <57966931.4020505@bfs.de> Date: Mon, 25 Jul 2016 21:32:01 +0200 From: walter harms Reply-To: wharms@bfs.de User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.1.16) Gecko/20101125 SUSE/3.0.11 Thunderbird/3.0.11 MIME-Version: 1.0 To: Lino Sanfilippo CC: SF Markus Elfring , LKML , kernel-janitors@vger.kernel.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH 3/3] staging: wilc1000: Reduce scope for a few variables in mac_ioctl() References: <1c4cac35-dded-ea88-45aa-3f8ac098289d@gmx.de> In-Reply-To: <1c4cac35-dded-ea88-45aa-3f8ac098289d@gmx.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 25.07.2016 21:17, schrieb Lino Sanfilippo: >> >> - 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. > > Lino also: the switch has only one case and default. re, wh