Thread (3 messages) 3 messages, 2 authors, 2017-03-25

selinux: Move some assignments for the variable "rc" in policydb_read()

From: paul@paul-moore.com (Paul Moore)
Date: 2017-03-25 15:38:26
Also in: kernel-janitors, lkml, selinux

On Fri, Mar 24, 2017 at 6:09 AM, SF Markus Elfring
[off-list ref] wrote:
quoted
quoted
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 <redacted>
---
 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.
quoted
I agree with the style you are using,
Thanks for such feedback.
quoted
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?
quoted
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?
To be honest, I would just leave it alone for now.  If you want to
contribute, focus on meaningful improvements such as bug fixing and/or
new features; changing only the code style isn't very interesting or
appealing, even if I happen to agree with your changes.

-- 
paul moore
www.paul-moore.com
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help