diff options
| author | LeRoyce Pearson <leroycepearson@geemili.xyz> | 2020-04-06 22:07:27 -0600 |
|---|---|---|
| committer | LeRoyce Pearson <leroycepearson@geemili.xyz> | 2020-04-06 22:07:27 -0600 |
| commit | 49886d2e452fd57f996795d92cd951649e4bc255 (patch) | |
| tree | 85ac934098fabfda1185789153e824b1b8eeec8f /lib/std/os.zig | |
| parent | 798207ec80c0e0092eb85325921c7656fe4c268d (diff) | |
| download | zig-49886d2e452fd57f996795d92cd951649e4bc255.tar.gz zig-49886d2e452fd57f996795d92cd951649e4bc255.zip | |
Remove return value from os.flock()
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index 1df22b0456..ec05a4a68a 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -3229,11 +3229,11 @@ pub const FlockError = error{ SystemResources, } || UnexpectedError; -pub fn flock(fd: fd_t, operation: i32) FlockError!usize { +pub fn flock(fd: fd_t, operation: i32) FlockError!void { while (true) { const rc = system.flock(fd, operation); switch (errno(rc)) { - 0 => return @intCast(usize, rc), + 0 => return, EBADF => unreachable, EINTR => continue, EINVAL => unreachable, // invalid parameters |
