summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2010-09-17 09:02:13 -0400
committerAdam Jackson <ajax@redhat.com>2010-09-22 10:57:02 -0400
commit2f003fe49697f8343c052dff2b3752eace814ea7 (patch)
treeec068ad3281a740b1fb5e18618f2bc4d1cda450c
parent09929da50503b559459f5b722c11647c47857fdb (diff)
loader: Remove the handle field from LoaderOpen
This was always 0 from all the callers. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Julien Cristau <jcristau@debian.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--hw/xfree86/loader/loader.c32
-rw-r--r--hw/xfree86/loader/loader.h2
-rw-r--r--hw/xfree86/loader/loadmod.c2
3 files changed, 17 insertions, 19 deletions
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 878cb398d..baadbc416 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -174,7 +174,7 @@ LoaderInit(void)
path = uwcrtpath; /* fallback: try to get libcrt.a from the uccs */
else
path = xcrtpath; /* get the libcrt.a we compiled with */
- LoaderOpen (path, 0, &errmaj, &errmin, &wasLoaded);
+ LoaderOpen (path, &errmaj, &errmin, &wasLoaded, 0);
}
#endif
}
@@ -203,8 +203,8 @@ do_dlopen(loaderPtr modrec, int flags)
/* Public Interface to the loader. */
int
-LoaderOpen(const char *module, int handle,
- int *errmaj, int *errmin, int *wasLoaded, int flags)
+LoaderOpen(const char *module, int *errmaj, int *errmin, int *wasLoaded,
+ int flags)
{
loaderPtr tmp;
int new_handle;
@@ -214,22 +214,20 @@ LoaderOpen(const char *module, int handle,
#endif
/* Is the module already loaded? */
- if (handle >= 0) {
- tmp = listHead;
- while (tmp) {
+ tmp = listHead;
+ while (tmp) {
#ifdef DEBUGLIST
- ErrorF("strcmp(%x(%s),{%x} %x(%s))\n", module, module,
- &(tmp->name), tmp->name, tmp->name);
+ ErrorF("strcmp(%x(%s),{%x} %x(%s))\n", module, module,
+ &(tmp->name), tmp->name, tmp->name);
#endif
- if (!strcmp(module, tmp->name)) {
- refCount[tmp->handle]++;
- if (wasLoaded)
- *wasLoaded = 1;
- xf86MsgVerb(X_INFO, 2, "Reloading %s\n", module);
- return tmp->handle;
- }
- tmp = tmp->next;
- }
+ if (!strcmp(module, tmp->name)) {
+ refCount[tmp->handle]++;
+ if (wasLoaded)
+ *wasLoaded = 1;
+ xf86MsgVerb(X_INFO, 2, "Reloading %s\n", module);
+ return tmp->handle;
+ }
+ tmp = tmp->next;
}
/*
diff --git a/hw/xfree86/loader/loader.h b/hw/xfree86/loader/loader.h
index 9dfc30758..4bb571e69 100644
--- a/hw/xfree86/loader/loader.h
+++ b/hw/xfree86/loader/loader.h
@@ -86,7 +86,7 @@ extern const ModuleVersions LoaderVersionInfo;
extern unsigned long LoaderOptions;
/* Internal Functions */
-int LoaderOpen(const char *, int, int *, int *, int *, int);
+int LoaderOpen(const char *, int *, int *, int *, int);
int LoaderHandleOpen(int);
#endif /* _LOADER_H */
diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c
index a9d04b832..e41e0c8d9 100644
--- a/hw/xfree86/loader/loadmod.c
+++ b/hw/xfree86/loader/loadmod.c
@@ -926,7 +926,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist,
*errmin = 0;
goto LoadModule_fail;
}
- ret->handle = LoaderOpen(found, 0, errmaj, errmin, &wasLoaded, flags);
+ ret->handle = LoaderOpen(found, errmaj, errmin, &wasLoaded, flags);
if (ret->handle < 0)
goto LoadModule_fail;