All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: prop: remove an unnecessary condition on parse_args
@ 2016-04-20  6:32 Satoru Takeuchi
  2016-04-25 12:02 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Satoru Takeuchi @ 2016-04-20  6:32 UTC (permalink / raw)
  To: linux-btrfs

>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(-)

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) {
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] btrfs-progs: prop: remove an unnecessary condition on parse_args
  2016-04-20  6:32 [PATCH] btrfs-progs: prop: remove an unnecessary condition on parse_args Satoru Takeuchi
@ 2016-04-25 12:02 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2016-04-25 12:02 UTC (permalink / raw)
  To: Satoru Takeuchi; +Cc: linux-btrfs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-25 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20  6:32 [PATCH] btrfs-progs: prop: remove an unnecessary condition on parse_args Satoru Takeuchi
2016-04-25 12:02 ` David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.