From 0ca311f6a1ef91d92b4ffe77cca58b2106b60f7c Mon Sep 17 00:00:00 2001 From: Ian Dowse Date: Fri, 27 Aug 2004 01:20:26 +0000 Subject: [PATCH] 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. --- sys/kern/kern_linker.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index d2a2329a488..49ad88b51ad 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -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);