Alexandre Julliard : adsldp/tests: Get rid of strchrW().
Alexandre Julliard
julliard at winehq.org
Mon Jan 27 15:00:13 CST 2020
Module: wine
Branch: master
Commit: c334d250beee5de1656a12132c46e05df6f7c034
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c334d250beee5de1656a12132c46e05df6f7c034
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sun Jan 26 10:53:33 2020 +0100
adsldp/tests: Get rid of strchrW().
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/adsldp/tests/sysinfo.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/dlls/adsldp/tests/sysinfo.c b/dlls/adsldp/tests/sysinfo.c
index db982aa82f..f2fc92a1b2 100644
--- a/dlls/adsldp/tests/sysinfo.c
+++ b/dlls/adsldp/tests/sysinfo.c
@@ -33,12 +33,6 @@
#include "wine/test.h"
-static WCHAR *strchrW(const WCHAR *str, WCHAR ch)
-{
- do { if (*str == ch) return (WCHAR *)(ULONG_PTR)str; } while (*str++);
- return NULL;
-}
-
static void test_ComputerName(void)
{
static const WCHAR cnW[] = { 'C','N','=' };
@@ -70,7 +64,7 @@ static void test_ComputerName(void)
ok(size == lstrlenW(buf) + 1, "got %u, expected %u\n", size, lstrlenW(buf) + 1);
ok(!memcmp(buf, cnW, sizeof(cnW)), "got %s\n", wine_dbgstr_w(buf));
ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %u)\n", wine_dbgstr_w(buf), name_size);
- p = strchrW(buf, ',');
+ p = wcschr(buf, ',');
ok(p != NULL, "delimiter was not found\n");
ok(p && !memcmp(p + 1, ComputersW, sizeof(ComputersW)), "got %s\n", p ? wine_dbgstr_w(p + 1) : wine_dbgstr_w(buf));
}
@@ -120,7 +114,7 @@ static void test_UserName(void)
ok(size == lstrlenW(buf), "got %u, expected %u\n", size, lstrlenW(buf));
ok(!memcmp(buf, cnW, sizeof(cnW)), "got %s\n", wine_dbgstr_w(buf));
ok(!memcmp(buf + 3, name, name_size), "got %s (name_size = %u)\n", wine_dbgstr_w(buf), name_size);
- p = strchrW(buf, ',');
+ p = wcschr(buf, ',');
ok(p != NULL, "delimiter was not found\n");
ok(p && !memcmp(p + 1, UsersW, sizeof(UsersW)), "got %s\n", p ? wine_dbgstr_w(p + 1) : wine_dbgstr_w(buf));
}
More information about the wine-cvs
mailing list