| author | |
| committer | |
| log | 3a21364b62b435d8e8e722a2b56dd13b8c91113d |
| tree | 5ce54c03f73444c9b3a3db514c06eea546843600 |
| parent | 13c63000cecd9a2d66efa68e62d02dbc3fbae3fd |
2 files changed, 2 insertions(+), 0 deletions(-)
Dir.zig+1| ... | @@ -10,6 +10,7 @@ const os = builtin.target.os.tag; | ... | @@ -10,6 +10,7 @@ const os = builtin.target.os.tag; |
| 10 | 10 | ||
| 11 | fd: nfs.Handle, | 11 | fd: nfs.Handle, |
| 12 | 12 | ||
| 13 | // Resource allocation may fail; resource deallocation must succeed. | ||
| 13 | pub fn close(self: Dir) void { | 14 | pub fn close(self: Dir) void { |
| 14 | if (os == .linux) | 15 | if (os == .linux) |
| 15 | sys_linux.close(@intFromEnum(self.fd)) catch {}; | 16 | sys_linux.close(@intFromEnum(self.fd)) catch {}; |
File.zig+1| ... | @@ -12,6 +12,7 @@ const os = builtin.target.os.tag; | ... | @@ -12,6 +12,7 @@ const os = builtin.target.os.tag; |
| 12 | 12 | ||
| 13 | fd: nfs.Handle, | 13 | fd: nfs.Handle, |
| 14 | 14 | ||
| 15 | // Resource allocation may fail; resource deallocation must succeed. | ||
| 15 | pub fn close(self: File) void { | 16 | pub fn close(self: File) void { |
| 16 | if (os == .linux) | 17 | if (os == .linux) |
| 17 | sys_linux.close(@intFromEnum(self.fd)) catch {}; | 18 | sys_linux.close(@intFromEnum(self.fd)) catch {}; |