Zebediah Figura : setupapi: Make the FDI handle a local variable.

Alexandre Julliard julliard at winehq.org
Fri Mar 5 15:31:15 CST 2021


Module: wine
Branch: master
Commit: b70b153c59e2aa9365beecc94ef63f6fefb19b9f
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=b70b153c59e2aa9365beecc94ef63f6fefb19b9f

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Mar  4 20:08:17 2021 -0600

setupapi: Make the FDI handle a local variable.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/setupapi/setupcab.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/setupapi/setupcab.c b/dlls/setupapi/setupcab.c
index 562db2f50c9..4824170d587 100644
--- a/dlls/setupapi/setupcab.c
+++ b/dlls/setupapi/setupcab.c
@@ -40,7 +40,6 @@ OSVERSIONINFOW OsVersionInfo;
 HINSTANCE SETUPAPI_hInstance = 0;
 
 typedef struct {
-  HFDI hfdi;
   PSP_FILE_CALLBACK_A msghandler;
   PVOID context;
   CHAR most_recent_cabinet_name[MAX_PATH];
@@ -255,6 +254,7 @@ BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved,
   ERF erf;
   CHAR pszCabinet[MAX_PATH], pszCabPath[MAX_PATH], *p = NULL;
   DWORD fpnsize;
+  HFDI hfdi;
   BOOL ret;
 
   TRACE("(CabinetFile == %s, Reserved == %u, MsgHandler == ^%p, Context == ^%p)\n",
@@ -293,14 +293,14 @@ BOOL WINAPI SetupIterateCabinetA(PCSTR CabinetFile, DWORD Reserved,
 
   my_hsc.msghandler = MsgHandler;
   my_hsc.context = Context;
-  my_hsc.hfdi = FDICreate( sc_cb_alloc, sc_cb_free, sc_cb_open, sc_cb_read,
-                           sc_cb_write, sc_cb_close, sc_cb_lseek, cpuUNKNOWN, &erf );
+  hfdi = FDICreate(sc_cb_alloc, sc_cb_free, sc_cb_open, sc_cb_read,
+        sc_cb_write, sc_cb_close, sc_cb_lseek, cpuUNKNOWN, &erf);
 
-  if (!my_hsc.hfdi) return FALSE;
+  if (!hfdi) return FALSE;
 
-  ret = FDICopy(my_hsc.hfdi, pszCabinet, pszCabPath, 0, sc_FNNOTIFY_A, NULL, &my_hsc);
+  ret = FDICopy(hfdi, pszCabinet, pszCabPath, 0, sc_FNNOTIFY_A, NULL, &my_hsc);
 
-  FDIDestroy(my_hsc.hfdi);
+  FDIDestroy(hfdi);
   return ret;
 }
 




More information about the wine-cvs mailing list