From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932783AbdCXKJi (ORCPT ); Fri, 24 Mar 2017 06:09:38 -0400 Received: from mout.web.de ([212.227.15.4]:59084 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754738AbdCXKJZ (ORCPT ); Fri, 24 Mar 2017 06:09:25 -0400 Subject: Re: selinux: Move some assignments for the variable "rc" in policydb_read() To: Paul Moore References: <7fdcfc8f-affa-fcf8-adaf-dc8fd9e1b472@users.sourceforge.net> Cc: linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, Eric Paris , James Morris , "Serge E. Hallyn" , Stephen Smalley , William Roberts , LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: Date: Fri, 24 Mar 2017 11:09:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:weSFYDHo7MFlNMcJjkApLM9jlDDLWD0iKICQli+XqermX5oCl9w AamXgG4TyqNjRf9Vz8/aJ3zy2/HVwsBDLx8LcyulHWhvUdcHiLQA3erP7iopbDvirpxjtRV t3W0T7bLvD39vYGpFDCMMlEAJVQy5wHMbQBrtTNvMruHZMyxfYqt083SYcrJfXs6J2d2dX0 UKzy9Ps9gHAFhwjlzfghA== X-UI-Out-Filterresults: notjunk:1;V01:K0:pwRgFW6e/I8=:1MEolreBOeIqOm5wdq8wPS HEwvJOisK7I3w9NHeeTJ4CVUWyWFZL2Hn7YRy26AbDuhjDcjdANROv3aGUo8PRlxGfr979TeG qpb/wXTMaz4XZdUipds3o6NxyeiBjMnzp2ARR1G2AsE4udU59Aio3+WBvFd+Q+dc0lwzxq5KL kex5/Ymt5fhQw+ll8ed9HMGmulkKgJ5kreVClD80C3DXy2rtbUvAXLWJTec6e2Nfnn81oBIRx nUE9Ixp3mUEc37AvX8FSAQgc58Uy/BX0qBi5P017cR6esEHXu40hEBg9FwRfGQYaUUlxQvQS+ PoF1KmdpHgfzZkcE5kUGmbv4mG7Gm565xPzNvRHBYLwHAVc9OZNKpbh/YuqBRH3MYj13QKQiB egucQnZafTPEsb8tzfYLNK0iV1MgMjS8sip7MSi3rUA9WFQtQ6D0UqdUum4AakPnIT/ir1tmF KZH2YMoBsaim8V3RfJV4la/tIgU1rY9NwSmPaPTORn0paXFifLObu2pEDxYIfMJZ2GD4sIr3L V3oBlFOx9+D4O4/WiJbj0G8UrQtBbt/JZK0/ts8ckr9re6upab4A/C2h4Ngy6CBPA3J5dLfJY VgApOSpjxCMvR9fajl55UdSmhmdCrH5IoKj6s7wHu4I3ADpisfOFV8P51Q1QZhm+w62CaNKsD ZSR9XmPrYYY70AT4p+f3eVTVxFWEptJps/Jb6honaSKSkPMOLPUFlRJ8WMXg1Tb5WbnPqGKyS LvW+p/ZQ+l+OUfJ7bVKtx+4CzuqfLUahZGs5cxQwm+a6wqZMG/pu2RSkLPTQGS5cq13fjBcv+ Hzs7kSk Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> One local variable was set to an error code in some cases before >> a concrete error situation was detected. Thus move the corresponding >> assignments into if branches to indicate a software failure there. >> >> Signed-off-by: Markus Elfring >> --- >> security/selinux/ss/policydb.c | 59 +++++++++++++++++++++++++----------------- >> 1 file changed, 35 insertions(+), 24 deletions(-) > > More code churn with no real advantage. There are different opinions about the mentioned implementation details. > I agree with the style you are using, Thanks for such feedback. > and would support changing it if you are in the function fixing bugs > or doing other substantial changes in that code, Is this expectation a contradiction for a desired patch granularity? > but I can't justify it as a standalone change, sorry. This update suggestion seems to be not attractive enough for you at the moment as another change step of my patch series. Would you like to check if there are other effects worthwhile besides the proposed coding style adjustment here? Regards, Markus