loader: Remove unused arguments from LoadModule

Nobody was ever calling this with a non-null argument for subdir list or
pattern list.  Having done this, InitSubdirs is only ever called with a
NULL argument, so it's really just a complicated way of duplicating the
default list; we can remove that and just walk the list directly.

The minor error code was only ever used to distinguish among two cases
of LDR_BADUSAGE. Whatever.

Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2016-04-14 11:45:58 -04:00
commit 8920dca009
7 changed files with 21 additions and 199 deletions

View file

@ -1473,7 +1473,7 @@ ddxUseMsg(void)
Bool
xf86LoadModules(const char **list, void **optlist)
{
int errmaj, errmin;
int errmaj;
void *opt;
int i;
char *name;
@ -1503,8 +1503,8 @@ xf86LoadModules(const char **list, void **optlist)
else
opt = NULL;
if (!LoadModule(name, NULL, NULL, opt, NULL, &errmaj, &errmin)) {
LoaderErrorMsg(NULL, name, errmaj, errmin);
if (!LoadModule(name, opt, NULL, &errmaj)) {
LoaderErrorMsg(NULL, name, errmaj, 0);
failed = TRUE;
}
free(name);