From: John Johansen <john.johansen@canonical.com>
To: jmorris@namei.org
Cc: linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org,
kbuild test robot <fengguang.wu@intel.com>
Subject: [PATCH 1/6] apparmor: fix boolreturn.cocci warnings
Date: Thu, 6 Apr 2017 06:55:19 -0700 [thread overview]
Message-ID: <20170406135524.25481-2-john.johansen@canonical.com> (raw)
In-Reply-To: <20170406135524.25481-1-john.johansen@canonical.com>
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
next prev parent reply other threads:[~2017-04-06 13:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 13:55 [GIT PULL] AppArmor fixes for 4.12 John Johansen
2017-04-06 13:55 ` John Johansen [this message]
2017-04-06 13:55 ` [PATCH 2/6] security/apparmor/lsm.c: set debug messages John Johansen
2017-04-06 13:55 ` [PATCH 3/6] apparmor: use SHASH_DESC_ON_STACK John Johansen
2017-04-06 13:55 ` [PATCH 4/6] apparmor: fix invalid reference to index variable of iterator line 836 John Johansen
2017-04-06 13:55 ` [PATCH 5/6] apparmor: fix parameters so that the permission test is bypassed at boot John Johansen
2017-04-06 13:55 ` [PATCH 6/6] apparmor: Make path_max parameter readonly John Johansen
2017-04-06 22:58 ` [GIT PULL] AppArmor fixes for 4.12 James Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170406135524.25481-2-john.johansen@canonical.com \
--to=john.johansen@canonical.com \
--cc=fengguang.wu@intel.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®