summaryrefslogtreecommitdiff
path: root/fs/orangefs/xattr.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-17 21:35:16 +0200
committerMike Marshall <hubcap@omnibond.com>2017-09-14 14:58:31 -0400
commit0b08273c8ab7e688832120c4817b1adfdc56e231 (patch)
treed0da15cfafc361208379e07dc2975f2777e287d7 /fs/orangefs/xattr.c
parent5e273a0e06ee5a50bb9cd40026177feca060c101 (diff)
orangefs: Adjust three checks for null pointers
MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The script “checkpatch.pl” pointed information out like the following. Comparison to NULL could be written !… Thus fix affected source code places. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
Diffstat (limited to 'fs/orangefs/xattr.c')
-rw-r--r--fs/orangefs/xattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/orangefs/xattr.c b/fs/orangefs/xattr.c
index fed0e9aae23b..81ac88bb91ff 100644
--- a/fs/orangefs/xattr.c
+++ b/fs/orangefs/xattr.c
@@ -239,7 +239,7 @@ int orangefs_inode_setxattr(struct inode *inode, const char *name,
internal_flag = convert_to_internal_xattr_flags(flags);
/* This is equivalent to a removexattr */
- if (size == 0 && value == NULL) {
+ if (size == 0 && !value) {
gossip_debug(GOSSIP_XATTR_DEBUG,
"removing xattr (%s)\n",
name);
@@ -311,7 +311,7 @@ ssize_t orangefs_listxattr(struct dentry *dentry, char *buffer, size_t size)
int i = 0;
int returned_count = 0;
- if (size > 0 && buffer == NULL) {
+ if (size > 0 && !buffer) {
gossip_err("%s: bogus NULL pointers\n", __func__);
return -EINVAL;
}