[PATCH 10/12] msacm32: Remove unnecessary checks from PCM driver.

Zebediah Figura z.figura12 at gmail.com
Tue Jun 6 15:14:59 CDT 2017


These are already checked in format functions.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/msacm32/pcmconverter.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/dlls/msacm32/pcmconverter.c b/dlls/msacm32/pcmconverter.c
index 70ec62fd2f..e4bc5e7777 100644
--- a/dlls/msacm32/pcmconverter.c
+++ b/dlls/msacm32/pcmconverter.c
@@ -1037,7 +1037,6 @@ static	LRESULT	PCM_FormatDetails(PACMFORMATDETAILSW afd, DWORD dwQuery)
         }
 	break;
     case ACM_FORMATDETAILSF_INDEX:
-	assert(afd->dwFormatIndex < NUM_PCM_FORMATS);
 	afd->pwfx->wFormatTag = WAVE_FORMAT_PCM;
 	afd->pwfx->nChannels = PCM_Formats[afd->dwFormatIndex].nChannels;
 	afd->pwfx->nSamplesPerSec = PCM_Formats[afd->dwFormatIndex].rate;
@@ -1072,9 +1071,7 @@ static	LRESULT	PCM_FormatSuggest(PACMDRVFORMATSUGGEST adfs)
     TRACE("(%p)\n", adfs);
 
     /* some tests ... */
-    if (adfs->cbwfxSrc < sizeof(PCMWAVEFORMAT) ||
-        adfs->cbwfxDst < sizeof(PCMWAVEFORMAT) ||
-        PCM_GetFormatIndex(adfs->pwfxSrc) == 0xFFFFFFFF) {
+    if (PCM_GetFormatIndex(adfs->pwfxSrc) == 0xFFFFFFFF) {
             WARN("not possible\n");
             return ACMERR_NOTPOSSIBLE;
     }
-- 
2.13.0




More information about the wine-patches mailing list