[apparmor] [PATCH 05/15] apparmor: add utility function to get an arbitrary tasks profile.
John Johansen
john.johansen at canonical.com
Fri Jul 13 23:44:11 UTC 2012
On 07/12/2012 02:15 PM, Seth Arnold wrote:
> I think I'd rather see this function a little differently:
>
> +static inline bool __aa_task_is_confined(struct task_struct *task)
> +{
> +if (unconfined(__aa_task_profile(task)))
> +return 0;
> +
> +return 1;
> +}
>
> It could be "return !unconfined(__aa_task_profile(task))". That'd make it clear the swapped true/false is intentional. (It'd also remove a conditional branch but one hopes the compiler already made this change.)
sure that makes a lot of sense, and I am not sure why I didn't write it that way
More information about the AppArmor
mailing list