Re: [PATCH 1/3] SELinux: standardize return code handling in policydb.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 23, 2010 at 9:16 AM, Joshua Brindle <method@xxxxxxxxxxxxxxx> wrote:
>
>
> Eric Paris wrote:
>>
>> policydb.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.
>>
>
> Any chance the same fixes could be made in libsepol policydb.c? :)

If people like that style I can attack libsepol too.  James doesn't
quite seem sold yet....

-Eric


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.

[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux