Commit b9c42ac7 authored by kbuild test robot's avatar kbuild test robot Committed by James Morris

apparmor: fix boolreturn.cocci warnings

security/apparmor/lib.c:132:9-10: WARNING: return of 0/1 in function 'aa_policy_init' with return type bool

 Return statements in functions returning bool should use
 true/false instead of 1/0.
Generated by: scripts/coccinelle/misc/boolreturn.cocci
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
parent 08eff49d
...@@ -180,13 +180,13 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix, ...@@ -180,13 +180,13 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix,
} else } else
policy->hname = kstrdup(name, gfp); policy->hname = kstrdup(name, gfp);
if (!policy->hname) if (!policy->hname)
return 0; return false;
/* base.name is a substring of fqname */ /* base.name is a substring of fqname */
policy->name = basename(policy->hname); policy->name = basename(policy->hname);
INIT_LIST_HEAD(&policy->list); INIT_LIST_HEAD(&policy->list);
INIT_LIST_HEAD(&policy->profiles); INIT_LIST_HEAD(&policy->profiles);
return 1; return true;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment