[PATCH 1/3] btrfs-progs: cleanup dead return after usage() for fi-disk_usage

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

 



The usage() calls exit() internally, so remove the return after it.

Signed-off-by: Gui Hecheng <guihc.fnst@xxxxxxxxxxxxxx>
---
 cmds-fi-disk_usage.c | 12 +++---------
 1 file changed, 3 insertions(+), 9 deletions(-)

diff --git a/cmds-fi-disk_usage.c b/cmds-fi-disk_usage.c
index e4eb72b..a3b06be 100644
--- a/cmds-fi-disk_usage.c
+++ b/cmds-fi-disk_usage.c
@@ -494,10 +494,8 @@ int cmd_filesystem_df(int argc, char **argv)
 		}
 	}
 
-	if (check_argc_min(argc - optind, 1)) {
+	if (check_argc_min(argc - optind, 1))
 		usage(cmd_filesystem_df_usage);
-		return 21;
-	}
 
 	for (i = optind; i < argc ; i++) {
 		int r, fd;
@@ -914,10 +912,8 @@ int cmd_filesystem_disk_usage(int argc, char **argv)
 		}
 	}
 
-	if (check_argc_min(argc - optind, 1)) {
+	if (check_argc_min(argc - optind, 1))
 		usage(cmd_filesystem_disk_usage_usage);
-		return 21;
-	}
 
 	for (i = optind; i < argc ; i++) {
 		int r, fd;
@@ -1050,10 +1046,8 @@ int cmd_device_disk_usage(int argc, char **argv)
 		}
 	}
 
-	if (check_argc_min(argc - optind, 1)) {
+	if (check_argc_min(argc - optind, 1))
 		usage(cmd_device_disk_usage_usage);
-		return 21;
-	}
 
 	for (i = optind; i < argc ; i++) {
 		int r, fd;
-- 
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