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 commit ab7f057ce9
changed 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>
This commit is contained in:
parent
8b6a750097
commit
e4dcf580f0
|
@ -911,7 +911,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
|
||||||
goto LoadModule_fail;
|
goto LoadModule_fail;
|
||||||
}
|
}
|
||||||
ret->handle = LoaderOpen(found, errmaj, errmin);
|
ret->handle = LoaderOpen(found, errmaj, errmin);
|
||||||
if (ret->handle < 0)
|
if (ret->handle == NULL)
|
||||||
goto LoadModule_fail;
|
goto LoadModule_fail;
|
||||||
ret->path = strdup(found);
|
ret->path = strdup(found);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue