summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstd/resolve.myr17
1 files changed, 9 insertions, 8 deletions
diff --git a/libstd/resolve.myr b/libstd/resolve.myr
index db5785b..ea9ed21 100644
--- a/libstd/resolve.myr
+++ b/libstd/resolve.myr
@@ -141,15 +141,16 @@ const addhosts = {addr, as, str
while true
match word(str)
| `Some (name, rest):
- if !hthas(hostmap, name)
- hinf = [
- .fam=fam,
- .stype = 0,
- .ttl = 0,
- .addr = addr
- ]
- htput(hostmap, name, hinf)
+ if hthas(hostmap, name)
+ continue
;;
+ hinf = [
+ .fam=fam,
+ .stype = 0,
+ .ttl = 0,
+ .addr = addr
+ ]
+ htput(hostmap, name, hinf)
str = rest
| `None:
->