Skip to contentSkip to conversation

misc: remove useless code in set_inode_xattr()

PATCH Applied Zhiqiang Liu 3 participants 4 messages Feb 26, 2021 – Apr 2, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: remove useless code in set_inode_xattr()

In set_inode_xattr(), there are two returns as follows, -
return retval;
return 0;
-
Here, we remove useless 'return 0;' code.

---
 misc/create_inode.c | 1 -
 1 file changed, 1 deletion(-)
misc/create_inode.c +0 -1
index 54d8d343..d62e1cb4 100644
@@ -234,7 +234,6 @@ static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino,
 		retval = retval ? retval : close_retval;
 	}
 	return retval;
-	return 0;
 }
 #else /* HAVE_LLISTXATTR */
 static errcode_t set_inode_xattr(ext2_filsys fs EXT2FS_ATTR((unused)),
Signature · 1 line
2.19.1
#1 lore raw

ping...

Quoted 26 lines · Zhiqiang Liu

In set_inode_xattr(), there are two returns as follows,

(quoted diff) +0 -2
-
  return retval;
  return 0;
-

Here, we remove useless 'return 0;' code.

---
 misc/create_inode.c | 1 -
 1 file changed, 1 deletion(-)
misc/create_inode.c +0 -1
index 54d8d343..d62e1cb4 100644
@@ -234,7 +234,6 @@ static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino,
 		retval = retval ? retval : close_retval;
 	}
 	return retval;
-	return 0;
 }
 #else /* HAVE_LLISTXATTR */
 static errcode_t set_inode_xattr(ext2_filsys fs EXT2FS_ATTR((unused)),
Reviewed-by
#2 lore raw
Quoted 9 lines · Zhiqiang Liu

In set_inode_xattr(), there are two returns as follows,

(quoted diff) +0 -2
-
 return retval;
 return 0;
-

Here, we remove useless 'return 0;' code.

Quoted 10 lines

---
misc/create_inode.c | 1 -

1 file changed, 1 deletion(-)
misc/create_inode.c +0 -0
index 54d8d343..d62e1cb4 100644

misc/create_inode.c static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino, · line 239

Quoted 7 lines
misc/create_inode.c +0 -1
@@ -234,7 +234,6 @@ static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino,
 		retval = retval ? retval : close_retval;
 	}
 	return retval;
-	return 0;
 }
 #else /* HAVE_LLISTXATTR */
 static errcode_t set_inode_xattr(ext2_filsys fs EXT2FS_ATTR((unused)),

Cheers, Andreas