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>
master
Satoru Takeuchi 2016-05-09 16:52:11 +09:00 committed by David Sterba
parent ad474ff50c
commit 640391b299
1 changed files with 0 additions and 12 deletions

View File

@ -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);