[WINESYNC] setupapi: Make the FDI handle a local variable.

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

wine commit id b70b153c59e2aa9365beecc94ef63f6fefb19b9f by Zebediah Figura <z.figura12@gmail.com>
This commit is contained in:
winesync 2023-09-16 16:37:59 +02:00 committed by Hermès Bélusca-Maïto
parent 6f9a34a1c9
commit 4c9e5df9cf
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
2 changed files with 7 additions and 7 deletions

View file

@ -28,7 +28,6 @@ HINSTANCE SETUPAPI_hInstance = NULL;
OSVERSIONINFOEXW OsVersionInfo;
typedef struct {
HFDI hfdi;
PSP_FILE_CALLBACK_A msghandler;
PVOID context;
CHAR most_recent_cabinet_name[MAX_PATH];
@ -241,6 +240,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",
@ -279,14 +279,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;
}

View file

@ -10,4 +10,4 @@ files:
dlls/setupapi/setupcab.c: dll/win32/setupapi/setupcab.c
dlls/setupapi/stringtable.c: dll/win32/setupapi/stringtable_wine.c
tags:
wine: 6b248f788c251223e2b7123cad90a25f55e13337
wine: b70b153c59e2aa9365beecc94ef63f6fefb19b9f