aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorkbuild test robot <fengguang.wu@intel.com>2017-04-06 06:55:19 -0700
committerJames Morris <james.l.morris@oracle.com>2017-04-07 08:58:35 +1000
commitb9c42ac76ea13ab6d07681ff3079b3a242333764 (patch)
treeb8b0f5b87f3517d001e4008fd88b25064c421cc2 /security
parenttpm/tpm_crb: Enable TPM CRB interface for ARM64 (diff)
downloadlinux-dev-b9c42ac76ea13ab6d07681ff3079b3a242333764.tar.xz
linux-dev-b9c42ac76ea13ab6d07681ff3079b3a242333764.zip
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: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c
index 66475bda6f72..32cafc12593e 100644
--- a/security/apparmor/lib.c
+++ b/security/apparmor/lib.c
@@ -180,13 +180,13 @@ bool aa_policy_init(struct aa_policy *policy, const char *prefix,
} else
policy->hname = kstrdup(name, gfp);
if (!policy->hname)
- return 0;
+ return false;
/* base.name is a substring of fqname */
policy->name = basename(policy->hname);
INIT_LIST_HEAD(&policy->list);
INIT_LIST_HEAD(&policy->profiles);
- return 1;
+ return true;
}
/**