summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>2016-05-09 16:52:11 +0900
committerDavid Sterba <dsterba@suse.com>2016-05-11 16:43:42 +0200
commit640391b2997dced1af3d189759fdd2939c558546 (patch)
treed2cb4c96205fdbf1fb90b36f5e7753e1cca04b8b
parentad474ff50cdde156135f88b059e1a9b05ae3f239 (diff)
btrfs-progs: prop: remove conditions which never be satisfied
parse_args() always set at least one parameter, 'object', for {get,list} subcommands. In addition, it always set all three parameters, 'object', 'name', and 'value' for set subcommand. So the following conditions can be removed. Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--cmds-property.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/cmds-property.c b/cmds-property.c
index 46be8f3b..e59882b4 100644
--- a/cmds-property.c
+++ b/cmds-property.c
@@ -385,10 +385,6 @@ static int cmd_property_get(int argc, char **argv)
parse_args(argc, argv, cmd_property_get_usage, &types, &object, &name,
NULL, 1);
- if (!object) {
- error("invalid arguments");
- usage(cmd_property_get_usage);
- }
if (name)
ret = setget_prop(types, object, name, NULL);
@@ -416,10 +412,6 @@ static int cmd_property_set(int argc, char **argv)
parse_args(argc, argv, cmd_property_set_usage, &types,
&object, &name, &value, 3);
- if (!object || !name || !value) {
- error("invalid arguments");
- usage(cmd_property_set_usage);
- }
ret = setget_prop(types, object, name, value);
@@ -442,10 +434,6 @@ static int cmd_property_list(int argc, char **argv)
parse_args(argc, argv, cmd_property_list_usage,
&types, &object, NULL, NULL, 1);
- if (!object) {
- error("invalid arguments");
- usage(cmd_property_list_usage);
- }
ret = dump_props(types, object, 1);