Commit 6f163b56 authored by Alexandre Julliard's avatar Alexandre Julliard

Avoid 'clobbered by longjmp' warnings.

parent cdd9a4a5
......@@ -75,10 +75,11 @@ static unsigned DRIVER_GetNumberOfModuleRefs(HMODULE hModule, WINE_DRIVER** foun
*/
LPWINE_DRIVER DRIVER_FindFromHDrvr(HDRVR hDrvr)
{
LPWINE_DRIVER d = (LPWINE_DRIVER)hDrvr;
LPWINE_DRIVER d;
__TRY
{
d = (LPWINE_DRIVER)hDrvr;
if (d && d->dwMagic != WINE_DI_MAGIC) d = NULL;
}
__EXCEPT(NULL)
......
......@@ -440,11 +440,11 @@ LPWINE_MLD MMDRV_Get(HANDLE _hndl, UINT type, BOOL bCanBeID)
if (hndl >= llTypes[type].wMaxId &&
hndl != (UINT16)-1 && hndl != (UINT)-1) {
if (hndl & 0x8000) {
hndl = hndl & ~0x8000;
if (hndl < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) {
mld = MM_MLDrvs[hndl];
UINT idx = hndl & ~0x8000;
if (idx < sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0])) {
__TRY
{
mld = MM_MLDrvs[idx];
if (mld && mld->type != type) mld = NULL;
}
__EXCEPT(NULL)
......@@ -453,7 +453,6 @@ LPWINE_MLD MMDRV_Get(HANDLE _hndl, UINT type, BOOL bCanBeID)
}
__ENDTRY;
}
hndl = hndl | 0x8000;
}
}
if (mld == NULL && bCanBeID) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment