From b89112c0ab84b134fc77a991d83f4d695b60500d Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 30 Nov 2010 20:04:05 +0900 Subject: [PATCH] [diskcontroller] use isalnum --- src/lib/elm_diskcontroller.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/elm_diskcontroller.c b/src/lib/elm_diskcontroller.c index 2ea9766..63d3e63 100644 --- a/src/lib/elm_diskcontroller.c +++ b/src/lib/elm_diskcontroller.c @@ -220,8 +220,7 @@ static int check_letter(const char *str, int length) int code = str[length]; if(code == '\0') return length; // null string - else if((code >= 'A' && code <= 'Z') || (code >= 'a' && code <= 'z')) return length; // alphabet - else if ('0'<=code && code<='9') return length; // number + else if(isalnum(code)) return length; // alphabet or number else if ((33<=code && code<47) || (58<=code && code<64) || (91<=code && code<96) || (123<=code && code<126)) return length; // special letter return length-1; -- 2.7.4