Michael Stefaniuc : mciseq: Simplify the check for an empty string.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 17 07:43:45 CST 2014


Module: wine
Branch: master
Commit: 560a78dd40fefc1c5b62dda1bf70b487e7a2373d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=560a78dd40fefc1c5b62dda1bf70b487e7a2373d

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Mon Nov 17 11:07:02 2014 +0100

mciseq: Simplify the check for an empty string.

---

 dlls/mciseq/mcimidi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/mciseq/mcimidi.c b/dlls/mciseq/mcimidi.c
index 4fcfb48..62b3192 100644
--- a/dlls/mciseq/mcimidi.c
+++ b/dlls/mciseq/mcimidi.c
@@ -683,7 +683,7 @@ static DWORD MIDI_mciOpen(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_OPEN_PARMSW lp
 
     if (dwFlags & MCI_OPEN_ELEMENT) {
 	TRACE("MCI_OPEN_ELEMENT %s!\n", debugstr_w(lpParms->lpstrElementName));
-	if (lpParms->lpstrElementName && strlenW(lpParms->lpstrElementName) > 0) {
+        if (lpParms->lpstrElementName && lpParms->lpstrElementName[0]) {
 	    wmm->hFile = mmioOpenW((LPWSTR)lpParms->lpstrElementName, NULL,
 				   MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
 	    if (wmm->hFile == 0) {




More information about the wine-cvs mailing list