From d785aa646f51d9c756d08dc56dbb105d66cfb4ee Mon Sep 17 00:00:00 2001 From: Michael Veksler Date: Sun, 18 Apr 1999 09:30:07 +0000 Subject: [PATCH] Simplify propertyNameCmp() and fix a warning in the way by removing CRTDLL__wcsupr() calls. --- ole/storage32.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ole/storage32.c b/ole/storage32.c index ce8226052b..24e45e9f83 100644 --- a/ole/storage32.c +++ b/ole/storage32.c @@ -1130,22 +1130,14 @@ static LONG propertyNameCmp( OLECHAR *newProperty, OLECHAR *currentProperty) { - LONG sizeOfNew = (lstrlenW(newProperty) +1) * sizeof(WCHAR); - LONG sizeOfCur = (lstrlenW(currentProperty)+1) * sizeof(WCHAR); - LONG diff = sizeOfNew - sizeOfCur; + LONG diff = lstrlenW(newProperty) - lstrlenW(currentProperty); if (diff == 0) { /* * We compare the string themselves only when they are of the same lenght */ - WCHAR wsnew[PROPERTY_NAME_MAX_LEN]; - WCHAR wscur[PROPERTY_NAME_MAX_LEN]; - - diff = lstrcmpW( (LPCWSTR)CRTDLL__wcsupr( - lstrcpynW(wsnew, newProperty, sizeOfNew)), - (LPCWSTR)CRTDLL__wcsupr( - lstrcpynW(wscur, currentProperty, sizeOfCur))); + diff = lstrcmpiW( newProperty, currentProperty); } return diff; -- 2.32.0.93.g670b81a890