diff mbox

btrfs-progs: prop: remove an unnecessary condition on parse_args

Message ID 57172290.1030005@jp.fujitsu.com (mailing list archive)
State Accepted
Headers show

Commit Message

Satoru Takeuchi April 20, 2016, 6:32 a.m. UTC
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>
---
 cmds-property.c | 5 -----
 1 file changed, 5 deletions(-)

Comments

David Sterba April 25, 2016, 12:02 p.m. UTC | #1
On Wed, Apr 20, 2016 at 03:32:48PM +0900, Satoru Takeuchi wrote:
> >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>

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

Patch

diff --git a/cmds-property.c b/cmds-property.c
index eed5f4a..48a8945 100644
--- a/cmds-property.c
+++ b/cmds-property.c
@@ -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) {