From 8f0ce5178e328e9b4dcdebc373e09270c2677ba9 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 29 Nov 2010 11:31:54 +0900 Subject: [PATCH] [diskcontroller] increase readability --- src/lib/elm_diskcontroller.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/elm_diskcontroller.c b/src/lib/elm_diskcontroller.c index 4ebd278..2ea9766 100644 --- a/src/lib/elm_diskcontroller.c +++ b/src/lib/elm_diskcontroller.c @@ -220,9 +220,9 @@ static int check_letter(const char *str, int length) int code = str[length]; if(code == '\0') return length; // null string - else if((code >= 65 && code <= 90) || (code >= 97 && code <= 122)) return length; // alphabet - else if (48<=code && code<58) return length; // number - else if ((33<=code && code<47) || (58<=code && code<64) || (91<=code && code<96) || (123<=code && code<126)) return length; // special letter + else if((code >= 'A' && code <= 'Z') || (code >= 'a' && code <= 'z')) return length; // alphabet + else if ('0'<=code && code<='9') return length; // 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