summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-01 23:45:42 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-12-05 14:33:00 -0800
commite4dcf580f007d6adcf5b0c639865d7aaab1a319d (patch)
tree856df97bdb033f286b6767ee2aaf9abd44708b91
parent8b6a75009746db4b8e2e180210ac097e35136bcd (diff)
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 ab7f057ce9df4e905b12 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>
-rw-r--r--hw/xfree86/loader/loadmod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index c697d74ed..5b9f8d1c3 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -911,7 +911,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);