Jacek Caban : wscript/tests: Get rid of mystrchr.

Alexandre Julliard julliard at winehq.org
Mon Feb 3 15:06:08 CST 2020


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

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Mon Feb  3 20:45:48 2020 +0100

wscript/tests: Get rid of mystrchr.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/wscript/tests/run.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/programs/wscript/tests/run.c b/programs/wscript/tests/run.c
index 9e5021c55d..dbd10f537a 100644
--- a/programs/wscript/tests/run.c
+++ b/programs/wscript/tests/run.c
@@ -74,17 +74,6 @@ static const GUID CLSID_TestObj =
 static const char *script_name;
 static HANDLE wscript_process;
 
-static const WCHAR* mystrrchr(const WCHAR *str, WCHAR ch)
-{
-    const WCHAR *pos = NULL, *current = str;
-    while(*current != 0) {
-        if(*current == ch)
-            pos = current;
-        ++current;
-    }
-    return pos;
-}
-
 static BSTR a2bstr(const char *str)
 {
     BSTR ret;
@@ -232,7 +221,7 @@ static HRESULT WINAPI Dispatch_Invoke(IDispatch *iface, DISPID dispIdMember, REF
         res = GetModuleFileNameExW(wscript_process, NULL, fullPath, ARRAY_SIZE(fullPath));
         if(res == 0)
             return E_FAIL;
-        pos = mystrrchr(fullPath, '\\');
+        pos = wcsrchr(fullPath, '\\');
         if(!(V_BSTR(pVarResult) = SysAllocStringLen(fullPath, pos-fullPath)))
             return E_OUTOFMEMORY;
         break;




More information about the wine-cvs mailing list