From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965324AbbI2OSz (ORCPT ); Tue, 29 Sep 2015 10:18:55 -0400 Received: from m12-17.163.com ([220.181.12.17]:41331 "EHLO m12-17.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965095AbbI2OSs (ORCPT ); Tue, 29 Sep 2015 10:18:48 -0400 From: Yaowei Bai To: paul@paul-moore.com, eparis@redhat.com Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] kernel/audit: audit_dummy_context can be boolean Date: Tue, 29 Sep 2015 22:15:39 +0800 Message-Id: <1443536141-5134-1-git-send-email-bywxiaobai@163.com> X-Mailer: git-send-email 1.9.1 X-CM-TRANSID: EcCowADn4SCHnQpWLccWDA--.53S3 X-Coremail-Antispam: 1Uf129KBjvJXoW7Gr4fXr1UCw15GFW5trWDArb_yoW8Jr1UpF WDuF48Ga18GFyjyFykA34UZF1Yvrn3GF1UCw15K3Z7AFZrtFnrG3Z5ua15t34UKryF9a17 ArWUKFyakrsrA3DanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07jhxhLUUUUU= X-Originating-IP: [58.209.166.66] X-CM-SenderInfo: xe1z5x5dretxi6rwjhhfrp/1tbiLQiET1SIKg883wAAs0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch makes audit_dummy_context return bool due to this particular function only using either one or zero as its return value. No functional change. Signed-off-by: Yaowei Bai --- include/linux/audit.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/audit.h b/include/linux/audit.h index b2abc99..69844b6 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -143,7 +143,7 @@ extern void __audit_inode_child(const struct inode *parent, extern void __audit_seccomp(unsigned long syscall, long signr, int code); extern void __audit_ptrace(struct task_struct *t); -static inline int audit_dummy_context(void) +static inline bool audit_dummy_context(void) { void *p = current->audit_context; return !p || *(int *)p; @@ -345,9 +345,9 @@ static inline void audit_syscall_entry(int major, unsigned long a0, { } static inline void audit_syscall_exit(void *pt_regs) { } -static inline int audit_dummy_context(void) +static inline bool audit_dummy_context(void) { - return 1; + return true; } static inline struct filename *audit_reusename(const __user char *name) { -- 1.9.1