Commit 6a4347be authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

winmm: Avoid a couple of unneeded lstrlenW() calls.

Note that since str is a buffer it cannot be NULL. Signed-off-by: 's avatarFrancois Gouget <fgouget@free.fr> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f9b04a72
......@@ -87,11 +87,11 @@ static HMMIO get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName)
TRACE("searching in SystemSound list for %s\n", debugstr_w(lpszName));
GetProfileStringW(wszSounds, lpszName, wszNull, str, ARRAY_SIZE(str));
if (lstrlenW(str) == 0)
if (!*str)
{
if (uFlags & SND_NODEFAULT) goto next;
GetProfileStringW(wszSounds, wszDefault, wszNull, str, ARRAY_SIZE(str));
if (lstrlenW(str) == 0) goto next;
if (!*str) goto next;
}
for (ptr = str; *ptr && *ptr != ','; ptr++);
if (*ptr) *ptr = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment