linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Justin Mitchell <jumitche@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Cc: Steve Dickson <steved@redhat.com>
Subject: [PATCH 1/5] nfs-utils: Ignore empty lines in config
Date: Wed, 20 Jun 2018 13:11:41 +0100	[thread overview]
Message-ID: <1529496701.7473.9.camel@redhat.com> (raw)
In-Reply-To: <1529496583.7473.8.camel@redhat.com>

The test for empty lines didn't ignore whitespace properly

Signed-off-by: Justin Mitchell <jumitche@redhat.com>
---
 support/nfs/conffile.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
index ee94031..d20460e 100644
--- a/support/nfs/conffile.c
+++ b/support/nfs/conffile.c
@@ -255,14 +255,14 @@ conf_parse_line(int trans, char *line, const char *filename, int lineno, char **
 	char *inc_section = NULL, *inc_subsection = NULL;
 	char *relpath, *subconf;
 
+	/* Strip off any leading blanks */
+	while (isspace(*line))
+		line++;
+
 	/* Ignore blank lines */
 	if (*line == '\0')
 		return;
 
-	/* Strip off any leading blanks */
-	while (isblank(*line))
-		line++;
-
 	/* Lines starting with '#' or ';' are comments.  */
 	if (*line == '#' || *line == ';')
 		return;
-- 
1.8.3.1




  reply	other threads:[~2018-06-20 12:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 12:09 [PATCH 0/5] nfs-utils: config value setting Justin Mitchell
2018-06-20 12:11 ` Justin Mitchell [this message]
2018-06-20 12:12 ` [PATCH 2/5] nfs-utils: Fix comparison check for subsection headers Justin Mitchell
2018-06-20 12:12 ` [PATCH 3/5] nfs-utils: swap xlog_err for less fatal version Justin Mitchell
2018-06-20 12:13 ` [PATCH 4/5] nfs-utils: Add config file writing function Justin Mitchell
2018-06-20 12:14 ` [PATCH 5/5] nfs-utils: Add config setting to nfsconf cli tool Justin Mitchell
2018-06-22  3:18   ` Calum Mackay
2018-06-22  9:43     ` Justin Mitchell
2018-06-25 15:38 ` [PATCH 0/5] nfs-utils: config value setting Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1529496701.7473.9.camel@redhat.com \
    --to=jumitche@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=steved@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).