This was always 0 from all the callers.

Signed-off-by: Adam Jackson <[email protected]>
---
 hw/xfree86/loader/loader.c  |   32 +++++++++++++++-----------------
 hw/xfree86/loader/loader.h  |    2 +-
 hw/xfree86/loader/loadmod.c |    2 +-
 3 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index 878cb39..baadbc4 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 9dfc307..4bb571e 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 a9d04b8..e41e0c8 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;
 
-- 
1.7.2.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to