lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200605021906.GA9371@affccafec3c9>
Date:   Fri, 5 Jun 2020 10:19:06 +0800
From:   kernel test robot <lkp@...el.com>
To:     Alexey Gladkov <gladkov.alexey@...il.com>,
        LKML <linux-kernel@...r.kernel.org>
Cc:     kbuild-all@...ts.01.org,
        Linux FS Devel <linux-fsdevel@...r.kernel.org>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Alexey Dobriyan <adobriyan@...il.com>,
        Alexey Gladkov <legion@...nel.org>,
        Andy Lutomirski <luto@...nel.org>,
        "Eric W . Biederman" <ebiederm@...ssion.com>,
        Kees Cook <keescook@...omium.org>
Subject: [PATCH] proc: fix boolreturn.cocci warnings

From: kernel test robot <lkp@...el.com>

fs/proc/generic.c:204:9-10: WARNING: return of 0/1 in function 'is_pde_visible' 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

CC: Alexey Gladkov <gladkov.alexey@...il.com>
Signed-off-by: kernel test robot <lkp@...el.com>
---

url:    https://github.com/0day-ci/linux/commits/Alexey-Gladkov/proc-use-subset-option-to-hide-some-top-level-procfs-entries/20200605-040818
base:    d4899e5542c15062cc55cac0ca99025bb64edc61

 generic.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -201,7 +201,7 @@ bool is_pde_visible(struct proc_fs_info
 	int i;
 
 	if (!fs_info->whitelist || pde == &proc_root)
-		return 1;
+		return true;
 
 	read_lock(&proc_subdir_lock);
 
@@ -218,7 +218,7 @@ bool is_pde_visible(struct proc_fs_info
 
 		if (ent == pde) {
 			read_unlock(&proc_subdir_lock);
-			return 1;
+			return true;
 		}
 
 		if (!S_ISDIR(ent->mode))
@@ -228,14 +228,14 @@ bool is_pde_visible(struct proc_fs_info
 		while (de != &proc_root) {
 			if (ent == de) {
 				read_unlock(&proc_subdir_lock);
-				return 1;
+				return true;
 			}
 			de = de->parent;
 		}
 	}
 
 	read_unlock(&proc_subdir_lock);
-	return 0;
+	return false;
 }
 
 static DEFINE_IDA(proc_inum_ida);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ