From patchwork Tue Aug 13 19:20:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Mayhew X-Patchwork-Id: 2843969 Return-Path: X-Original-To: patchwork-linux-nfs@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 784DBBF546 for ; Tue, 13 Aug 2013 19:20:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BE36920403 for ; Tue, 13 Aug 2013 19:20:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A094E20411 for ; Tue, 13 Aug 2013 19:20:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758298Ab3HMTUe (ORCPT ); Tue, 13 Aug 2013 15:20:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58677 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758274Ab3HMTUc (ORCPT ); Tue, 13 Aug 2013 15:20:32 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7DJKWup010158 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 13 Aug 2013 15:20:32 -0400 Received: from tonberry.usersys.redhat.com (dhcp145-64.rdu.redhat.com [10.13.145.64]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r7DJKWOw010812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 13 Aug 2013 15:20:32 -0400 Received: from tonberry.usersys.redhat.com (localhost [127.0.0.1]) by tonberry.usersys.redhat.com (8.14.5/8.14.5) with ESMTP id r7DJKVdH021437 for ; Tue, 13 Aug 2013 15:20:31 -0400 Received: (from smayhew@localhost) by tonberry.usersys.redhat.com (8.14.5/8.14.5/Submit) id r7DJKVwO021436 for linux-nfs@vger.kernel.org; Tue, 13 Aug 2013 15:20:31 -0400 From: Scott Mayhew To: linux-nfs@vger.kernel.org Subject: [nfs-utils PATCH 4/4] mount.nfs: clean up conf_parse_mntopts() Date: Tue, 13 Aug 2013 15:20:29 -0400 Message-Id: <1376421629-21382-5-git-send-email-smayhew@redhat.com> In-Reply-To: <1376421629-21382-1-git-send-email-smayhew@redhat.com> References: <1376421629-21382-1-git-send-email-smayhew@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-9.7 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 It's no longer necessary for conf_parse_mntopts to explicitly check for argtype != MNT_NOARG after calling should_add_noarg_opt(). Signed-off-by: Scott Mayhew --- utils/mount/configfile.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/utils/mount/configfile.c b/utils/mount/configfile.c index 623c886..8f68a6e 100644 --- a/utils/mount/configfile.c +++ b/utils/mount/configfile.c @@ -364,15 +364,12 @@ conf_parse_mntopts(char *section, char *arg, char *opts) } continue; } - if (argtype != MNT_NOARG) { - snprintf(buf, BUFSIZ, "no%s", field); - if (lookup_entry(buf) != NULL) - continue; - buf[0] = '\0'; - } + snprintf(buf, BUFSIZ, "no%s", field); + if (lookup_entry(buf) != NULL) + continue; + buf[0] = '\0'; if (strcasecmp(value, "false") == 0) { - if (argtype != MNT_NOARG) - snprintf(buf, BUFSIZ, "no%s", field); + snprintf(buf, BUFSIZ, "no%s", field); } else if (strcasecmp(value, "true") == 0) { snprintf(buf, BUFSIZ, "%s", field); } else {