Home
last modified time | relevance | path

Searched hist:b77a493b (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/security/selinux/
H A Dselinuxfs.cb77a493b Tue Nov 23 10:40:08 CST 2010 Eric Paris <eparis@redhat.com> SELinux: standardize return code handling in selinuxfs.c

selinuxfs.c has lots of different standards on how to handle return paths on
error. For the most part transition to

rc=errno
if (failure)
goto out;
[...]
out:
cleanup()
return rc;

Instead of doing cleanup mid function, or having multiple returns or other
options. This doesn't do that for every function, but most of the complex
functions which have cleanup routines on error.

Signed-off-by: Eric Paris <eparis@redhat.com>
b77a493b Tue Nov 23 10:40:08 CST 2010 Eric Paris <eparis@redhat.com> SELinux: standardize return code handling in selinuxfs.c

selinuxfs.c has lots of different standards on how to handle return paths on
error. For the most part transition to

rc=errno
if (failure)
goto out;
[...]
out:
cleanup()
return rc;

Instead of doing cleanup mid function, or having multiple returns or other
options. This doesn't do that for every function, but most of the complex
functions which have cleanup routines on error.

Signed-off-by: Eric Paris <eparis@redhat.com>