aboutsummaryrefslogtreecommitdiffstats
path: root/c_lhosts.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-15 20:20:20 +0100
committerJoe <rbo@gmx.us>2023-12-15 20:20:20 +0100
commitfe9990c570fd1d7e55e6e0af280e7959d4bc5187 (patch)
tree32d93e596b9ed872782ce7f237eb3f66d0434990 /c_lhosts.go
parentyeye (diff)
downloadhardflip-fe9990c570fd1d7e55e6e0af280e7959d4bc5187.tar.gz
hardflip-fe9990c570fd1d7e55e6e0af280e7959d4bc5187.tar.bz2
hardflip-fe9990c570fd1d7e55e6e0af280e7959d4bc5187.tar.xz
hardflip-fe9990c570fd1d7e55e6e0af280e7959d4bc5187.tar.zst
hardflip-fe9990c570fd1d7e55e6e0af280e7959d4bc5187.zip
you rock
Diffstat (limited to 'c_lhosts.go')
-rw-r--r--c_lhosts.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/c_lhosts.go b/c_lhosts.go
index cbe1f71..ac25a3c 100644
--- a/c_lhosts.go
+++ b/c_lhosts.go
@@ -102,3 +102,14 @@ func (lhost *HostList) del(id uint64) {
curr.next = curr.next.next
}
}
+
+func (lhost *HostList) sel(id uint64) *HostNode {
+ curr := lhost.head
+ for curr.next != nil && curr.ID != id {
+ curr = curr.next
+ }
+ if curr.ID != id {
+ return nil
+ }
+ return curr
+}