From 2b1082a68ac83c5a1e031998ae84c2a33d9245be Mon Sep 17 00:00:00 2001 From: fredrik Date: Tue, 29 May 2007 17:37:43 +0000 Subject: [PATCH] A working wcscasecmp replacement. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@1054 959494ce-11ee-0310-bf91-de5d638817bd --- common/utils.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/utils.c b/common/utils.c index bb29781..6dac3dc 100644 --- a/common/utils.c +++ b/common/utils.c @@ -441,11 +441,7 @@ int wcsexists(wchar_t *h, wchar_t *n) #ifndef HAVE_WCSCASECMP int wcscasecmp(const wchar_t *s1, const wchar_t *s2) { - while(towlower(*s1) == towlower(*s2)) - { - if(*s1 == L'\0') - return(0); - } + for(; (towlower(*s1) == towlower(*s2)) && (*s1 != L'\0'); s1++, s2++); return(towlower(*s1) - towlower(*s2)); } #endif -- 2.11.0