diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-06 12:14:58 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-06 14:56:36 -0300 |
| commit | 4839c4b037d401393bbc87143d663e115c71242e (patch) | |
| tree | 6d23e1cd9aaf89404dd53f03e6ada23588b42dcc /src/9p_io.zig | |
| parent | 77671575bd2f481651ea54e956ac5c7da8d63710 (diff) | |
| download | pardes-4839c4b037d401393bbc87143d663e115c71242e.tar.gz pardes-4839c4b037d401393bbc87143d663e115c71242e.zip | |
idioms #2, formats that cannot overflow say so: a bufPrint or a fixed writer whose buffer provably holds the text (numbers, a 128-byte name, a short phrase) is catch unreachable with its reason, not a catch "" or a stand-in sentence nobody can reach, and dump.check takes its 256-byte why as such
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/9p_io.zig')
| -rw-r--r-- | src/9p_io.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/9p_io.zig b/src/9p_io.zig index 70bd0bbf..72548d2a 100644 --- a/src/9p_io.zig +++ b/src/9p_io.zig @@ -355,7 +355,7 @@ pub const Listener = struct { const refused = l.refused.swap(0, .acq_rel); if (refused != 0) { var why: [64]u8 = undefined; - pardes.ctlfs.events.notePath(core, "err -", std.fmt.bufPrint(&why, "9p: too many connections ({d} turned away)", .{refused}) catch "9p: too many connections"); + pardes.ctlfs.events.notePath(core, "err -", std.fmt.bufPrint(&why, "9p: too many connections ({d} turned away)", .{refused}) catch unreachable); // a u32 fits 64 } if (!core.fs.news) return; core.fs.news = false; |
