From: Joe Perches <joe@perches.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Hans Reiser <reiserfs-dev@namesys.com>,
reiserfs-devel@vger.kernel.org
Subject: [PATCH] - [10/15] - remove defconfig ptr comparisons to 0 - fs/reiserfs
Date: Tue, 13 Nov 2007 18:05:28 -0800 [thread overview]
Message-ID: <1195005928.5163.96.camel@localhost> (raw)
Remove defconfig ptr comparison to 0
Remove sparse warning: Using plain integer as NULL pointer
Signed-off-by: Joe Perches <joe@perches.com>
---
diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c
index f85c5cf..40786d2 100644
--- a/fs/reiserfs/do_balan.c
+++ b/fs/reiserfs/do_balan.c
@@ -283,7 +283,7 @@ static int balance_leaf(struct tree_balance *tb, struct item_head *ih, /* item h
return balance_leaf_when_delete(tb, flag);
zeros_num = 0;
- if (flag == M_INSERT && body == 0)
+ if (flag == M_INSERT && !body)
zeros_num = ih_item_len(ih);
pos_in_item = tb->tb_path->pos_in_item;
@@ -1728,7 +1728,7 @@ struct buffer_head *get_FEB(struct tree_balance *tb)
struct buffer_info bi;
for (i = 0; i < MAX_FEB_SIZE; i++)
- if (tb->FEB[i] != 0)
+ if (tb->FEB[i])
break;
if (i == MAX_FEB_SIZE)
diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c
index 0ee35c6..af375c6 100644
--- a/fs/reiserfs/fix_node.c
+++ b/fs/reiserfs/fix_node.c
@@ -857,7 +857,7 @@ static int get_lfree(struct tree_balance *tb, int h)
struct buffer_head *l, *f;
int order;
- if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (l = tb->FL[h]) == 0)
+ if (!(f = PATH_H_PPARENT(tb->tb_path, h)) || !(l = tb->FL[h]))
return 0;
if (f == l)
@@ -878,7 +878,7 @@ static int get_rfree(struct tree_balance *tb, int h)
struct buffer_head *r, *f;
int order;
- if ((f = PATH_H_PPARENT(tb->tb_path, h)) == 0 || (r = tb->FR[h]) == 0)
+ if (!(f = PATH_H_PPARENT(tb->tb_path, h)) || !(r = tb->FR[h]))
return 0;
if (f == r)
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index b378eea..8867533 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -452,7 +452,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th,
buflen = DEH_SIZE + ROUND_UP(namelen);
if (buflen > sizeof(small_buf)) {
buffer = kmalloc(buflen, GFP_NOFS);
- if (buffer == 0)
+ if (!buffer)
return -ENOMEM;
} else
buffer = small_buf;
reply other threads:[~2007-11-14 2:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1195005928.5163.96.camel@localhost \
--to=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-dev@namesys.com \
--cc=reiserfs-devel@vger.kernel.org \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.