diff options
Diffstat (limited to 'sys/kern/kern_module.c')
-rw-r--r-- | sys/kern/kern_module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c index aa9ecb6..b9d35d7 100644 --- a/sys/kern/kern_module.c +++ b/sys/kern/kern_module.c @@ -81,7 +81,7 @@ module_shutdown(void* arg1, int arg2) { module_t mod; - for (mod = TAILQ_FIRST(&modules); mod; mod = TAILQ_NEXT(mod, link)) + TAILQ_FOREACH(mod, &modules, link) MOD_EVENT(mod, MOD_SHUTDOWN); } @@ -168,7 +168,7 @@ module_lookupbyname(const char* name) { module_t mod; - for (mod = TAILQ_FIRST(&modules); mod; mod = TAILQ_NEXT(mod, link)) { + TAILQ_FOREACH(mod, &modules, link) { if (!strcmp(mod->name, name)) return mod; } @@ -181,7 +181,7 @@ module_lookupbyid(int modid) { module_t mod; - for (mod = TAILQ_FIRST(&modules); mod; mod = TAILQ_NEXT(mod, link)) { + TAILQ_FOREACH(mod, &modules, link) { if (mod->id == modid) return mod; } |