mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-25 02:30:06 +01:00
LoaderOpen returns either a valid pointer or NULL, so don't check for < 0
Fixes Sun cc warning that was recently elevated to error by the stricter default CFLAGS changes to xorg-macros: "loadmod.c", line 914: improper pointer/integer combination: op "<" Should have been changed when commitab7f057ce9changed the LoaderOpen return type from int to void *. Changes log message when file is found but dlopen() fails from: (EE) LoadModule: Module dbe does not have a dbeModuleData data object. (EE) Failed to load module "dbe" (invalid module, 0) to: (EE) Failed to load module "dbe" (loader failed, 7) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commite4dcf580f0)
This commit is contained in:
parent
de6f92513b
commit
7abd360638
1 changed files with 1 additions and 1 deletions
|
|
@ -926,7 +926,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
|
|||
goto LoadModule_fail;
|
||||
}
|
||||
ret->handle = LoaderOpen(found, errmaj, errmin);
|
||||
if (ret->handle < 0)
|
||||
if (ret->handle == NULL)
|
||||
goto LoadModule_fail;
|
||||
ret->path = strdup(found);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue