diff options
Diffstat (limited to 'src/serve.zig')
| -rw-r--r-- | src/serve.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/serve.zig b/src/serve.zig index 5166b5f..ad774a3 100644 --- a/src/serve.zig +++ b/src/serve.zig @@ -1126,7 +1126,7 @@ test "serve: listenPosted serves the registry name and stop() unposts" { var real_buf: [std.fs.max_path_bytes]u8 = undefined; const len = try rig.dir.dir.realPath(io, &real_buf); var env_buf: [std.fs.max_path_bytes]u8 = undefined; - const value = try std.fmt.bufPrintZ(&env_buf, "XDG_RUNTIME_DIR={s}", .{real_buf[0..len]}); + const value = try std.fmt.bufPrintSentinel(&env_buf, "XDG_RUNTIME_DIR={s}", .{real_buf[0..len]}, 0); const env = [2]?[*:0]const u8{ @ptrCast(value.ptr), null }; const envp: post.Env = @ptrCast(&env); @@ -1171,7 +1171,7 @@ test "serve: a second listenPosted is refused; stop() never unposts another's na var real_buf: [std.fs.max_path_bytes]u8 = undefined; const len = try rig.dir.dir.realPath(io, &real_buf); var env_buf: [std.fs.max_path_bytes]u8 = undefined; - const value = try std.fmt.bufPrintZ(&env_buf, "XDG_RUNTIME_DIR={s}", .{real_buf[0..len]}); + const value = try std.fmt.bufPrintSentinel(&env_buf, "XDG_RUNTIME_DIR={s}", .{real_buf[0..len]}, 0); const env = [2]?[*:0]const u8{ @ptrCast(value.ptr), null }; const envp: post.Env = @ptrCast(&env); @@ -1209,7 +1209,7 @@ test "serve: listenPosted beside listen(): stop unposts only the registry name" var real_buf: [std.fs.max_path_bytes]u8 = undefined; const len = try rig.dir.dir.realPath(io, &real_buf); var env_buf: [std.fs.max_path_bytes]u8 = undefined; - const value = try std.fmt.bufPrintZ(&env_buf, "XDG_RUNTIME_DIR={s}", .{real_buf[0..len]}); + const value = try std.fmt.bufPrintSentinel(&env_buf, "XDG_RUNTIME_DIR={s}", .{real_buf[0..len]}, 0); const env = [2]?[*:0]const u8{ @ptrCast(value.ptr), null }; const envp: post.Env = @ptrCast(&env); @@ -1218,7 +1218,7 @@ test "serve: listenPosted beside listen(): stop unposts only the registry name" // A plain Unix listener (the application's path policy) beside the // posted name: both listener slots fill. var unix_buf: [std.fs.max_path_bytes]u8 = undefined; - const unix_path = try std.fmt.bufPrintZ(&unix_buf, "{s}/plain.sock", .{real_buf[0..len]}); + const unix_path = try std.fmt.bufPrintSentinel(&unix_buf, "{s}/plain.sock", .{real_buf[0..len]}, 0); _ = try rig.runner.listen(.{ .unix = unix_path }, 4); try rig.runner.listenPosted(envp, "mixed", 4); @@ -1419,7 +1419,7 @@ test "serve: every descriptor opened by the post/serve path is close-on-exec" { var real_buf: [std.fs.max_path_bytes]u8 = undefined; const rlen = try dir.dir.realPath(io, &real_buf); var env_buf: [std.fs.max_path_bytes]u8 = undefined; - const value = try std.fmt.bufPrintZ(&env_buf, "XDG_RUNTIME_DIR={s}", .{real_buf[0..rlen]}); + const value = try std.fmt.bufPrintSentinel(&env_buf, "XDG_RUNTIME_DIR={s}", .{real_buf[0..rlen]}, 0); const env = [2]?[*:0]const u8{ @ptrCast(value.ptr), null }; const envp: post.Env = @ptrCast(&env); |
