Skip to contentSkip to conversation

xfs: xfs_qm: remove unnecessary ‘0’ values from error

PATCH In review Li zeming 2 participants 2 messages Dec 23, 2022 – Jan 3, 2023 XFS filesystem

lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 xfs: xfs_qm: remove unnecessary ‘0’ values from error

error is assigned first, so it does not need to initialize the assignment.

---
 fs/xfs/xfs_qm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_qm.c +1 -1
index ff53d40a2dae..e2c542f6dcd4 100644
@@ -68,7 +68,7 @@ xfs_qm_dquot_walk(
 
 	while (1) {
 		struct xfs_dquot *batch[XFS_DQ_LOOKUP_BATCH];
-		int		error = 0;
+		int		error;
 		int		i;
 
 		mutex_lock(&qi->qi_tree_lock);
Signature · 1 line
2.18.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Li zeming

error is assigned first, so it does not need to initialize the assignment.

Looks fine to me...

--D

Quoted 20 lines
---
 fs/xfs/xfs_qm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_qm.c +1 -1
index ff53d40a2dae..e2c542f6dcd4 100644
@@ -68,7 +68,7 @@ xfs_qm_dquot_walk(
 
 	while (1) {
 		struct xfs_dquot *batch[XFS_DQ_LOOKUP_BATCH];
-		int		error = 0;
+		int		error;
 		int		i;
 
 		mutex_lock(&qi->qi_tree_lock);
Signature · 1 line
2.18.2