os/homedir: remove now unnecessary fba.reset()

This commit is contained in:
Jon Parise
2024-03-31 08:53:49 -07:00
parent 55b611e4cb
commit 29a5b52885

View File

@ -52,7 +52,6 @@ fn homeUnix(buf: []u8) !?[]u8 {
var fba = std.heap.FixedBufferAllocator.init(&tempBuf); var fba = std.heap.FixedBufferAllocator.init(&tempBuf);
// We try passwd. This doesn't work on multi-user mac but we try it anyways. // We try passwd. This doesn't work on multi-user mac but we try it anyways.
fba.reset();
const pw = try passwd.get(fba.allocator()); const pw = try passwd.get(fba.allocator());
if (pw.home) |result| { if (pw.home) |result| {
if (buf.len < result.len) return Error.BufferTooSmall; if (buf.len < result.len) return Error.BufferTooSmall;