btrfs-progs: prop: remove an unnecessary condition on parse_args
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Wed, 20 Apr 2016 06:32:48 +0000 (15:32 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 2 May 2016 12:42:13 +0000 (14:42 +0200)
>From commit c742debab11f ('btrfs-progs: fix a regression that
"property" with -t option doesn't work'), the number of arguments
is checked strictly. So the following condition never be
satisfied.

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-property.c

index eed5f4a..48a8945 100644 (file)
@@ -352,11 +352,6 @@ static void parse_args(int argc, char **argv,
        if (value && optind < argc)
                *value = argv[optind++];
 
-       if (optind != argc) {
-               error("unexpected agruments found");
-               usage(usage_str);
-       }
-
        if (!*types && object && *object) {
                ret = autodetect_object_types(*object, types);
                if (ret < 0) {