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>
This commit is contained in:
		
							parent
							
								
									09929da505
								
							
						
					
					
						commit
						2f003fe496
					
				| 
						 | 
				
			
			@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue