lkml.org 
[lkml]   [2017]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] proc: Fix bool initialization/comparison
From
Date
Bool initializations should use true and false. Bool tests don't need
comparisons.

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---

diff -u -p a/fs/proc/generic.c b/fs/proc/generic.c
--- a/fs/proc/generic.c
+++ b/fs/proc/generic.c
@@ -325,7 +325,7 @@ static int proc_register(struct proc_dir

write_lock(&proc_subdir_lock);
dp->parent = dir;
- if (pde_subdir_insert(dir, dp) == false) {
+ if (!pde_subdir_insert(dir, dp)) {
WARN(1, "proc_dir_entry '%s/%s' already registered\n",
dir->name, dp->name);
write_unlock(&proc_subdir_lock);
\
 
 \ /
  Last update: 2017-10-07 16:26    [W:0.800 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site