summaryrefslogtreecommitdiff
path: root/sys/kern/kern_module.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2001-02-04 13:13:25 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2001-02-04 13:13:25 +0000
commitfc2ffbe6040d6630a06229c5c9be77601fb635eb (patch)
tree328f91e23b34b382d998fba4c7e55796b240b62b /sys/kern/kern_module.c
parentef9e85abba5ce45c8b3fc840db320edb1abe0160 (diff)
Notes
Diffstat (limited to 'sys/kern/kern_module.c')
-rw-r--r--sys/kern/kern_module.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c
index aa9ecb6e8e99..b9d35d7bb870 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;
}