Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753978Ab1FJIEm (ORCPT ); Fri, 10 Jun 2011 04:04:42 -0400 Received: from swampdragon.chaosbits.net ([90.184.90.115]:19492 "EHLO swampdragon.chaosbits.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753630Ab1FJIEh (ORCPT ); Fri, 10 Jun 2011 04:04:37 -0400 Date: Fri, 10 Jun 2011 09:56:18 +0200 (CEST) From: Jesper Juhl To: Lucas De Marchi cc: Andrew Morton , "Eric W. Biederman" , Jesper Juhl , linux-kernel@vger.kernel.org, Nick Piggin , Christoph Hellwig , Al Viro , Lucas De Marchi Subject: Re: [PATCH] sysctl: remove impossible condition check In-Reply-To: <1307684165-14742-1-git-send-email-lucas.demarchi@profusion.mobi> Message-ID: References: <1307030444-7095-1-git-send-email-lucas.demarchi@profusion.mobi> <1307684165-14742-1-git-send-email-lucas.demarchi@profusion.mobi> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 853 Lines: 25 On Fri, 10 Jun 2011, Lucas De Marchi wrote: > Remove checks for conditions that will never happen. If procname is NULL > the loop would already had bailed out, so there's no need to check it > again. > > At the same time this also compacts the function find_in_table() by > refactoring it to be easier to read. > > Signed-off-by: Lucas De Marchi Looks good to me. Reviewed-by: Jesper Juhl -- Jesper Juhl http://www.chaosbits.net/ Don't top-post http://www.catb.org/jargon/html/T/top-post.html Plain text mails only, please. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/