[setupapi] Fixed wrong check (Coverity)

Paul Vriens Paul.Vriens at xs4all.nl
Sun Sep 17 03:24:41 CDT 2006


Hi,

we should check against MachineName. The if-statement is needed as MachineName
can be NULL and then there is not need to convert.

Fixes Coverity CID-33.

Changelog
  Fixed wrong check

Cheers,

Paul.

---
 dlls/setupapi/devinst.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 778c66c..37a7302 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -351,7 +351,7 @@ BOOL WINAPI SetupDiClassGuidsFromNameExA
     if (ClassNameW == NULL)
         return FALSE;
 
-    if (MachineNameW)
+    if (MachineName)
     {
         MachineNameW = MultiByteToUnicode(MachineName, CP_ACP);
         if (MachineNameW == NULL)
-- 
1.4.2.1




More information about the wine-patches mailing list