[PATCH] wineoss.drv: print strerror of errno, not of -1 (Coverity)

Marcus Meissner marcus at jet.franken.de
Sat Aug 6 06:26:18 CDT 2011


Hi,

CID 5257 sees this negative, so not strerror capable.
OSSv4 Documentation says that errno is in use.

Ciao, Marcus
---
 dlls/wineoss.drv/mmdevdrv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/wineoss.drv/mmdevdrv.c b/dlls/wineoss.drv/mmdevdrv.c
index 6c10a53..1e69a22 100644
--- a/dlls/wineoss.drv/mmdevdrv.c
+++ b/dlls/wineoss.drv/mmdevdrv.c
@@ -250,7 +250,7 @@ static UINT get_default_index(EDataFlow flow, char **keys, UINT num)
 
     ai.dev = -1;
     if((err = ioctl(fd, SNDCTL_ENGINEINFO, &ai)) < 0){
-        WARN("SNDCTL_ENGINEINFO failed: %d (%s)\n", err, strerror(err));
+        WARN("SNDCTL_ENGINEINFO failed: %d (%s)\n", err, strerror(errno));
         close(fd);
         return 0;
     }
-- 
1.7.3.4




More information about the wine-patches mailing list