Christian Gmeiner : setupapi: Remove unneeded NULL checks before
MyFree().
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jul 20 06:20:46 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: bb80e2282e88c65a14cc0a1e82f4852baabcbcb0
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=bb80e2282e88c65a14cc0a1e82f4852baabcbcb0
Author: Christian Gmeiner <christian.gmeiner at students.fhv.at>
Date: Wed Jul 19 19:39:48 2006 +0200
setupapi: Remove unneeded NULL checks before MyFree().
---
dlls/setupapi/devinst.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index c4e0bec..7d076b8 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -148,8 +148,7 @@ BOOL WINAPI SetupDiBuildClassInfoListExA
ClassGuidListSize, RequiredSize,
MachineNameW, Reserved);
- if (MachineNameW)
- MyFree(MachineNameW);
+ MyFree(MachineNameW);
return bResult;
}
@@ -366,9 +365,7 @@ BOOL WINAPI SetupDiClassGuidsFromNameExA
ClassGuidListSize, RequiredSize,
MachineNameW, Reserved);
- if (MachineNameW)
- MyFree(MachineNameW);
-
+ MyFree(MachineNameW);
MyFree(ClassNameW);
return bResult;
@@ -636,8 +633,7 @@ SetupDiCreateDeviceInfoListExA(const GUI
hDevInfo = SetupDiCreateDeviceInfoListExW(ClassGuid, hwndParent,
MachineNameW, Reserved);
- if (MachineNameW)
- MyFree(MachineNameW);
+ MyFree(MachineNameW);
return hDevInfo;
}
@@ -1303,8 +1299,7 @@ HKEY WINAPI SetupDiOpenClassRegKeyExA(
hKey = SetupDiOpenClassRegKeyExW(ClassGuid, samDesired,
Flags, MachineNameW, Reserved);
- if (MachineNameW)
- MyFree(MachineNameW);
+ MyFree(MachineNameW);
return hKey;
}
More information about the wine-cvs
mailing list