public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libblkid: Make use of isalnum()
@ 2013-02-17  1:37 Zeeshan Ali (Khattak)
  2013-02-18 11:23 ` Karel Zak
  0 siblings, 1 reply; 3+ messages in thread
From: Zeeshan Ali (Khattak) @ 2013-02-17  1:37 UTC (permalink / raw)
  To: util-linux; +Cc: Zeeshan Ali (Khattak)

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-18 13:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-17  1:37 [PATCH] libblkid: Make use of isalnum() Zeeshan Ali (Khattak)
2013-02-18 11:23 ` Karel Zak
2013-02-18 13:35   ` Zeeshan Ali (Khattak)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox