src/loadso/os2/SDL_sysloadso.c
branchSDL-1.2
changeset 11964 6c37a15030e7
parent 6137 4720145f848b
     1.1 --- a/src/loadso/os2/SDL_sysloadso.c	Sat Mar 24 22:21:15 2018 +0300
     1.2 +++ b/src/loadso/os2/SDL_sysloadso.c	Sat Mar 24 22:25:33 2018 +0300
     1.3 @@ -35,12 +35,12 @@
     1.4  
     1.5  void *SDL_LoadObject(const char *sofile)
     1.6  {
     1.7 -    HMODULE handle = NULL;
     1.8 +    HMODULE handle = NULLHANDLE;
     1.9      char buf[512];
    1.10      APIRET ulrc = DosLoadModule(buf, sizeof (buf), (char *) sofile, &handle);
    1.11  
    1.12      /* Generate an error message if all loads failed */
    1.13 -    if ((ulrc != NO_ERROR) || (handle == NULL))
    1.14 +    if ((ulrc != NO_ERROR) || (handle == NULLHANDLE))
    1.15          SDL_SetError("Failed loading %s: %s", sofile, buf);
    1.16  
    1.17      return((void *) handle);
    1.18 @@ -49,8 +49,9 @@
    1.19  void *SDL_LoadFunction(void *handle, const char *name)
    1.20  {
    1.21      const char *loaderror = "Unknown error";
    1.22 -    void *symbol = NULL;
    1.23 +    PFN symbol = NULL;
    1.24      APIRET ulrc = DosQueryProcAddr((HMODULE)handle, 0, (char *)name, &symbol);
    1.25 +
    1.26      if (ulrc == ERROR_INVALID_HANDLE)
    1.27          loaderror = "Invalid module handle";
    1.28      else if (ulrc == ERROR_INVALID_NAME)
    1.29 @@ -59,7 +60,7 @@
    1.30      if (symbol == NULL)
    1.31          SDL_SetError("Failed loading %s: %s", name, loaderror);
    1.32  
    1.33 -    return(symbol);
    1.34 +    return((void *) symbol);
    1.35  }
    1.36  
    1.37  void SDL_UnloadObject(void *handle)