aboutsummaryrefslogtreecommitdiff
path: root/lib/std/net.zig
diff options
context:
space:
mode:
authorr00ster91 <r00ster91@proton.me>2023-06-02 22:02:45 -0400
committerAndrew Kelley <andrew@ziglang.org>2023-06-16 13:44:09 -0700
commit259315606827620daaabf82b479e59ee710097cd (patch)
tree16c797e4cc15479a27e64b4414517d9334f52250 /lib/std/net.zig
parent22c6b6c9a9378aaca75c83c2182a6d94298f6bc2 (diff)
downloadzig-259315606827620daaabf82b479e59ee710097cd.tar.gz
zig-259315606827620daaabf82b479e59ee710097cd.zip
migration: std.math.{min, min3, max, max3} -> `@min` & `@max`
Diffstat (limited to 'lib/std/net.zig')
-rw-r--r--lib/std/net.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/std/net.zig b/lib/std/net.zig
index 64b13ec544..dfd6fe4a9e 100644
--- a/lib/std/net.zig
+++ b/lib/std/net.zig
@@ -1482,11 +1482,11 @@ fn getResolvConf(allocator: mem.Allocator, rc: *ResolvConf) !void {
error.InvalidCharacter => continue,
};
if (mem.eql(u8, name, "ndots")) {
- rc.ndots = std.math.min(value, 15);
+ rc.ndots = @min(value, 15);
} else if (mem.eql(u8, name, "attempts")) {
- rc.attempts = std.math.min(value, 10);
+ rc.attempts = @min(value, 10);
} else if (mem.eql(u8, name, "timeout")) {
- rc.timeout = std.math.min(value, 60);
+ rc.timeout = @min(value, 60);
}
}
} else if (mem.eql(u8, token, "nameserver")) {
@@ -1615,7 +1615,7 @@ fn resMSendRc(
}
// Wait for a response, or until time to retry
- const clamped_timeout = std.math.min(@as(u31, std.math.maxInt(u31)), t1 + retry_interval - t2);
+ const clamped_timeout = @min(@as(u31, std.math.maxInt(u31)), t1 + retry_interval - t2);
const nevents = os.poll(&pfd, clamped_timeout) catch 0;
if (nevents == 0) continue;