diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-02-03 11:46:35 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-02-03 11:46:35 +0000 |
| commit | 22f29826756b763aca9e89b47514fc327289cd8e (patch) | |
| tree | 78d4d0b994635164b8d2e9b6d1d7e7c3bfa70d29 /sys/net/hostcache.c | |
| parent | 3df8ada3ff88d2a38bbaa85a87b4b98f5b9e4190 (diff) | |
Notes
Diffstat (limited to 'sys/net/hostcache.c')
| -rw-r--r-- | sys/net/hostcache.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/hostcache.c b/sys/net/hostcache.c index 0a1d4c00d912..415750c21433 100644 --- a/sys/net/hostcache.c +++ b/sys/net/hostcache.c @@ -90,8 +90,8 @@ hc_get(struct sockaddr *sa) if (hct->hct_nentries == 0) return 0; hash = hct->hct_cb->hccb_hash(sa, hct->hct_nentries); - hc = hct->hct_heads[hash].lh_first; - for (; hc; hc = hc->hc_link.le_next) { + hc = hct->hct_heads[hash]LIST_FIRST(&); + for (; hc; hc = LIST_NEXT(hc, hc_link)) { if (cmpsa(hc->hc_host, sa) == 0) break; } @@ -153,8 +153,8 @@ hc_insert(struct hcentry *hc) hct = &hctable[hc->hc_host->sa_family]; hash = hct->hct_cb->hccb_hash(hc->hc_host, hct->hct_nentries); - hc2 = hct->hct_heads[hash].lh_first; - for (; hc2; hc2 = hc2->hc_link.le_next) { + hc2 = hct->hct_heads[hash]LIST_FIRST(&); + for (; hc2; hc2 = LIST_NEXT(hc2, hc_link)) { if (cmpsa(hc2->hc_host, hc->hc_host) == 0) break; } @@ -214,8 +214,8 @@ hc_timeout(void *xhct) if (hct->hct_idle == 0) return; for (j = 0; j < hct->hct_nentries; j++) { - for (hc = hct->hct_heads[j].lh_first; hc; - hc = hc->hc_link.le_next) { + for (hc = hct->hct_heads[j]LIST_FIRST(&); hc; + hc = LIST_NEXT(hc, hc_link)) { if (hc->hc_refcnt > 0) continue; if (hc->hc_idlesince.tv_sec + hc_maxidle <= start) { |
