From de47eb59bb829423b1d0f47ba13099073999b3cb Mon Sep 17 00:00:00 2001 From: Nicolas Planel Date: Wed, 29 Oct 2003 16:07:11 +0000 Subject: Corporate Server 2.1.1 release --- mdk-stage1/dietlibc/lib/tolower.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mdk-stage1/dietlibc/lib/tolower.c') diff --git a/mdk-stage1/dietlibc/lib/tolower.c b/mdk-stage1/dietlibc/lib/tolower.c index 4b7c7cf2d..c24932ef4 100644 --- a/mdk-stage1/dietlibc/lib/tolower.c +++ b/mdk-stage1/dietlibc/lib/tolower.c @@ -1,6 +1,8 @@ #include -inline int tolower(int c) { - return (c>='A' && c<='Z')?c-'A'+'a':c; +int tolower(int ch) { + if ( (unsigned int)(ch - 'A') < 26u ) + ch += 'a' - 'A'; + return ch; } -- cgit v1.2.1