When trying each linker class in turn with a preloaded module, exit

the loop if the preload was successful. Previously a successful
preload was ignored if the linker class was not the last in the
list.
This commit is contained in:
iedowse 2004-08-27 01:20:26 +00:00
parent 6f160e076a
commit c9e02b44f4

View File

@ -1203,10 +1203,9 @@ linker_preload(void *arg)
lf = NULL;
TAILQ_FOREACH(lc, &classes, link) {
error = LINKER_LINK_PRELOAD(lc, modname, &lf);
if (error) {
lf = NULL;
if (!error)
break;
}
lf = NULL;
}
if (lf)
TAILQ_INSERT_TAIL(&loaded_files, lf, loaded);