[PATCH 2/3] btrfs-progs: remove unnecessary return value check in btrfs-property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The function @parse_prop() returns either -1 or 0, no need to check
for other values. Just return the unnecessary check.

Signed-off-by: Gui Hecheng <guihc.fnst@xxxxxxxxxxxxxx>
---
 cmds-property.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/cmds-property.c b/cmds-property.c
index 90c7603..a764293 100644
--- a/cmds-property.c
+++ b/cmds-property.c
@@ -276,10 +276,6 @@ static int setget_prop(int types, const char *object,
 		fprintf(stderr, "ERROR: property is unknown\n");
 		ret = 40;
 		goto out;
-	} else if (ret) {
-		fprintf(stderr, "ERROR: parse_prop reported unknown error\n");
-		ret = 42;
-		goto out;
 	}
 
 	types &= prop->types;
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux