From patchwork Wed Apr 20 06:32:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satoru Takeuchi X-Patchwork-Id: 8886231 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 56A1FBF29F for ; Wed, 20 Apr 2016 06:33:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 863E120263 for ; Wed, 20 Apr 2016 06:33:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 94ADB2025A for ; Wed, 20 Apr 2016 06:33:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754171AbcDTGdk (ORCPT ); Wed, 20 Apr 2016 02:33:40 -0400 Received: from mgwkm02.jp.fujitsu.com ([202.219.69.169]:47267 "EHLO mgwkm02.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752966AbcDTGdj (ORCPT ); Wed, 20 Apr 2016 02:33:39 -0400 Received: from kw-mxq.gw.nic.fujitsu.com (unknown [192.168.231.130]) by mgwkm02.jp.fujitsu.com with smtp id 2349_4756_f7097d81_3935_4d6a_ac00_1e25ed5099b5; Wed, 20 Apr 2016 15:33:33 +0900 Received: from m3050.s.css.fujitsu.com (msm.b.css.fujitsu.com [10.134.21.208]) by kw-mxq.gw.nic.fujitsu.com (Postfix) with ESMTP id 5E4DCAC00ED for ; Wed, 20 Apr 2016 15:33:32 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.4.6 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20160122 X-SHieldMailCheckerMailID: 7e919319e47944ed82e4af916380e73a To: "linux-btrfs@vger.kernel.org" From: Satoru Takeuchi Subject: [PATCH] btrfs-progs: prop: remove an unnecessary condition on parse_args Message-ID: <57172290.1030005@jp.fujitsu.com> Date: Wed, 20 Apr 2016 15:32:48 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 X-TM-AS-MML: disable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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) {