Alexandre Julliard : crypt32/tests: Get rid of strncmpW().

Alexandre Julliard julliard at winehq.org
Mon Jan 27 15:00:13 CST 2020


Module: wine
Branch: master
Commit: d5a5f53b58b3346a4d8d2e2c27d20f1ae7133662
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=d5a5f53b58b3346a4d8d2e2c27d20f1ae7133662

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sun Jan 26 10:54:47 2020 +0100

crypt32/tests: Get rid of strncmpW().

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/crypt32/tests/encode.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c
index cea948151c..38d2f84db1 100644
--- a/dlls/crypt32/tests/encode.c
+++ b/dlls/crypt32/tests/encode.c
@@ -1922,13 +1922,6 @@ static void test_encodeUnicodeNameValue(DWORD dwEncoding)
     }
 }
 
-static inline int strncmpW( const WCHAR *str1, const WCHAR *str2, int n )
-{
-    if (n <= 0) return 0;
-    while ((--n > 0) && *str1 && (*str1 == *str2)) { str1++; str2++; }
-    return *str1 - *str2;
-}
-
 static void test_decodeUnicodeNameValue(DWORD dwEncoding)
 {
     DWORD i;
@@ -1951,7 +1944,7 @@ static void test_decodeUnicodeNameValue(DWORD dwEncoding)
             ok(value->dwValueType == unicodeResults[i].valueType,
              "Expected value type %d, got %d\n", unicodeResults[i].valueType,
              value->dwValueType);
-            ok(!strncmpW((LPWSTR)value->Value.pbData, unicodeResults[i].str,
+            ok(!wcsncmp((LPWSTR)value->Value.pbData, unicodeResults[i].str,
              value->Value.cbData / sizeof(WCHAR)),
              "Unexpected decoded value for index %d (value type %d)\n", i,
              unicodeResults[i].valueType);




More information about the wine-cvs mailing list