https://git.reactos.org/?p=reactos.git;a=commitdiff;h=e85c54a5c7013efc1dc185fc986877facf6c2f17

commit e85c54a5c7013efc1dc185fc986877facf6c2f17
Author:     Thamatip Chitpong <[email protected]>
AuthorDate: Wed Jun 14 09:17:30 2023 +0700
Commit:     Stanislav Motylkov <[email protected]>
CommitDate: Thu Jul 6 13:36:22 2023 +0300

    [WINESYNC][WINMM] PlaySound: Avoid a unneeded lstrlenW call
    
    Note that since str is a buffer it cannot be NULL.
    
    Based on Wine commit: 6a4347be371bea544e0d4a81f4cfacd29af18d6e
    
    author: Francois Gouget <[email protected]>
    Mon, 16 Sep 2019 14:01:04 +0000 (16:01 +0200)
    
    committer: Alexandre Julliard <[email protected]>
    Mon, 16 Sep 2019 20:58:42 +0000 (22:58 +0200)
---
 dll/win32/winmm/playsound.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dll/win32/winmm/playsound.c b/dll/win32/winmm/playsound.c
index 7e5fb34a24a..f71cbd32a21 100644
--- a/dll/win32/winmm/playsound.c
+++ b/dll/win32/winmm/playsound.c
@@ -72,7 +72,7 @@ static HMMIO get_mmioFromProfile(UINT uFlags, LPCWSTR 
lpszName)
                       L"",
                       str,
                       ARRAY_SIZE(str));
-    if (lstrlenW(str) == 0)
+    if (!*str)
         goto Next;
 
     for (ptr = str; *ptr && *ptr != L','; ptr++);

Reply via email to