Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1618038
| From | John Johansen <john.johansen@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/6] apparmor: fix boolreturn.cocci warnings |
| Date | 2017-04-06 16:00 +0200 |
| Message-ID | <ttg79-MK-53@gated-at.bofh.it> (permalink) |
| References | <ttg77-MK-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: kbuild test robot <fengguang.wu@intel.com> 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> --- security/apparmor/lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/apparmor/lib.c b/security/apparmor/lib.c index 66475bd..32cafc1 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; } /** -- 2.9.3
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL] AppArmor fixes for 4.12 John Johansen <john.johansen@canonical.com> - 2017-04-06 16:00 +0200 [PATCH 3/6] apparmor: use SHASH_DESC_ON_STACK John Johansen <john.johansen@canonical.com> - 2017-04-06 16:00 +0200 [PATCH 1/6] apparmor: fix boolreturn.cocci warnings John Johansen <john.johansen@canonical.com> - 2017-04-06 16:00 +0200 [PATCH 2/6] security/apparmor/lsm.c: set debug messages John Johansen <john.johansen@canonical.com> - 2017-04-06 16:00 +0200 Re: [GIT PULL] AppArmor fixes for 4.12 James Morris <jmorris@namei.org> - 2017-04-07 01:00 +0200
csiph-web