mciwave: Return on error (Coverity).
authorMarcus Meissner <marcus@jet.franken.de>
Sat, 17 Oct 2009 15:44:21 +0000 (17:44 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 19 Oct 2009 09:42:20 +0000 (11:42 +0200)
dlls/mciwave/mciwave.c

index 8729bfba053b36d578d4868385ed169d83d3277a..8eb6bad4c4d9b0b897c5f2463128140b6d1fa41e 100644 (file)
@@ -1579,9 +1579,10 @@ static DWORD WAVE_mciInfo(MCIDEVICEID wDevID, DWORD dwFlags, LPMCI_INFO_PARMSW l
 
     TRACE("(%u, %08X, %p);\n", wDevID, dwFlags, lpParms);
 
-    if (lpParms == NULL || lpParms->lpstrReturn == NULL) {
-       ret = MCIERR_NULL_PARAMETER_BLOCK;
-    } else if (wmw == NULL) {
+    if (!lpParms || !lpParms->lpstrReturn)
+       return MCIERR_NULL_PARAMETER_BLOCK;
+
+    if (wmw == NULL) {
        ret = MCIERR_INVALID_DEVICE_ID;
     } else {
         static const WCHAR wszAudio  [] = {'W','i','n','e','\'','s',' ','a','u','d','i','o',' ','p','l','a','y','e','r',0};