From patchwork Sat Apr 19 00:14:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rakesh Pandit X-Patchwork-Id: 4019141 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2764FBFF02 for ; Sat, 19 Apr 2014 00:18:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A9C32024F for ; Sat, 19 Apr 2014 00:18:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CFE12021A for ; Sat, 19 Apr 2014 00:18:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754712AbaDSAPY (ORCPT ); Fri, 18 Apr 2014 20:15:24 -0400 Received: from nbl-ex10-fe02.nebula.fi ([188.117.32.122]:36409 "EHLO ex10.nebula.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754574AbaDSAOd (ORCPT ); Fri, 18 Apr 2014 20:14:33 -0400 Received: from hercules.tuxera.com (88.195.159.123) by ex10.nebula.fi (188.117.32.115) with Microsoft SMTP Server (TLS) id 14.3.174.1; Sat, 19 Apr 2014 03:14:30 +0300 Date: Sat, 19 Apr 2014 03:14:29 +0300 From: Rakesh Pandit To: Subject: [PATCH] Btrfs-progs: cmds-subvolume: use parameter str instead of optarg Message-ID: <20140419001428.GA5788@hercules.tuxera.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [88.195.159.123] 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Fix unused parameter str (commit e8cfa3c8): get_subvolid was called with optarg passed as str, but get_subvolid kept using optarg. Signed-off-by: Rakesh Pandit --- cmds-subvolume.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds-subvolume.c b/cmds-subvolume.c index bd81a8f..639fb10 100644 --- a/cmds-subvolume.c +++ b/cmds-subvolume.c @@ -596,9 +596,9 @@ static int get_subvolid(const char *str, u64 *subvolid) { char *p; errno = 0; - *subvolid = strtoull(optarg, &p, 10); + *subvolid = strtoull(str, &p, 10); if (errno || *p != '\0') { - fprintf(stderr, "ERROR: invalid subvolume id '%s'\n", optarg); + fprintf(stderr, "ERROR: invalid subvolume id '%s'\n", str); return -EINVAL; } return 0;