Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754193Ab2E3PH4 (ORCPT ); Wed, 30 May 2012 11:07:56 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:46234 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751414Ab2E3PHz (ORCPT ); Wed, 30 May 2012 11:07:55 -0400 MIME-Version: 1.0 In-Reply-To: <1338371703-28858-1-git-send-email-sasikanth.v19@gmail.com> References: <1338371703-28858-1-git-send-email-sasikanth.v19@gmail.com> Date: Wed, 30 May 2012 08:07:53 -0700 X-Google-Sender-Auth: PmG8HaoKEoCqahULJT76mtNSXkM Message-ID: Subject: Re: [PATCH] prctl: Removed redunant assignment of "error" to zero From: Kees Cook To: Sasikantha babu Cc: Serge Hallyn , Andrew Morton , "Eric W. Biederman" , James Morris , linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 X-System-Of-Record: true Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 723 Lines: 20 On Wed, May 30, 2012 at 2:55 AM, Sasikantha babu wrote: > Just setting the "error" to error number is enough on failure and > It doesn't require to set "error" variable to zero in each switch case, since > it was already initialized with zero This looks fine. Can you include an additional clean up in this? It looks like PR_SET_NAME and PR_GET_NAME both 'return 0' instead of using 'break' like all the rest. -Kees -- Kees Cook Chrome OS Security -- 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/