diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-04-26 13:57:08 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-04-28 13:24:43 -0700 |
| commit | 6261c1373168b265047db5704d9d0fd5f2e458f2 (patch) | |
| tree | 18d6f31107b2c42ac9c6567b42f577bca41d769b /lib/std/net.zig | |
| parent | 57ea6207d3cb2db706bdc06c14605e4b901736dd (diff) | |
| download | zig-6261c1373168b265047db5704d9d0fd5f2e458f2.tar.gz zig-6261c1373168b265047db5704d9d0fd5f2e458f2.zip | |
update codebase to use `@memset` and `@memcpy`
Diffstat (limited to 'lib/std/net.zig')
| -rw-r--r-- | lib/std/net.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/net.zig b/lib/std/net.zig index d59676ec17..70b4b2fd91 100644 --- a/lib/std/net.zig +++ b/lib/std/net.zig @@ -106,7 +106,7 @@ pub const Address = extern union { // Add 1 to ensure a terminating 0 is present in the path array for maximum portability. if (path.len + 1 > sock_addr.path.len) return error.NameTooLong; - mem.set(u8, &sock_addr.path, 0); + @memset(&sock_addr.path, 0); mem.copy(u8, &sock_addr.path, path); return Address{ .un = sock_addr }; @@ -346,7 +346,7 @@ pub const Ip6Address = extern struct { if (!saw_any_digits) { if (abbrv) return error.InvalidCharacter; // ':::' if (i != 0) abbrv = true; - mem.set(u8, ip_slice[index..], 0); + @memset(ip_slice[index..], 0); ip_slice = tail[0..]; index = 0; continue; @@ -465,7 +465,7 @@ pub const Ip6Address = extern struct { if (!saw_any_digits) { if (abbrv) return error.InvalidCharacter; // ':::' if (i != 0) abbrv = true; - mem.set(u8, ip_slice[index..], 0); + @memset(ip_slice[index..], 0); ip_slice = tail[0..]; index = 0; continue; |
