public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: "Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>
To: util-linux@vger.kernel.org
Cc: "Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>
Subject: [PATCH] libblkid: Make use of isalnum()
Date: Sun, 17 Feb 2013 03:37:32 +0200	[thread overview]
Message-ID: <1361065052-18695-1-git-send-email-zeeshanak@gnome.org> (raw)

From: "Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>

---
 libblkid/src/encode.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libblkid/src/encode.c b/libblkid/src/encode.c
index ff57be4..e96e0e2 100644
--- a/libblkid/src/encode.c
+++ b/libblkid/src/encode.c
@@ -181,9 +181,7 @@ static int replace_whitespace(const char *str, char *to, size_t len)
 
 static int is_whitelisted(char c, const char *white)
 {
-	if ((c >= '0' && c <= '9') ||
-	    (c >= 'A' && c <= 'Z') ||
-	    (c >= 'a' && c <= 'z') ||
+	if (isalnum (c) ||
 	    strchr("#+-.:=@_", c) != NULL ||
 	    (white != NULL && strchr(white, c) != NULL))
 		return 1;
-- 
1.8.1.2


             reply	other threads:[~2013-02-17  1:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-17  1:37 Zeeshan Ali (Khattak) [this message]
2013-02-18 11:23 ` [PATCH] libblkid: Make use of isalnum() Karel Zak
2013-02-18 13:35   ` Zeeshan Ali (Khattak)

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=1361065052-18695-1-git-send-email-zeeshanak@gnome.org \
    --to=zeeshanak@gnome.org \
    --cc=util-linux@vger.kernel.org \
    /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