From d52a9b61af066deaa29398bb4195418f2817e42c Mon Sep 17 00:00:00 2001 From: Vitalii Kravchenko Date: Sun, 2 Oct 2022 07:47:22 +0100 Subject: [PATCH] Fix indentation --- core/os/os_darwin.odin | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/core/os/os_darwin.odin b/core/os/os_darwin.odin index 9dbb73a25..ac7376752 100644 --- a/core/os/os_darwin.odin +++ b/core/os/os_darwin.odin @@ -375,18 +375,18 @@ MAX_RW :: 0x7fffffff // The limit on Darwin is max(i32), trying to read/write mo write :: proc(fd: Handle, data: []u8) -> (int, Errno) { assert(fd != -1) - bytes_total := len(data) - bytes_written_total := 0 + bytes_total := len(data) + bytes_written_total := 0 - for bytes_written_total < bytes_total { + for bytes_written_total < bytes_total { bytes_to_write := min(bytes_total - bytes_written_total, MAX_RW) - slice := data[bytes_written_total:bytes_written_total + bytes_to_write] - bytes_written := _unix_write(fd, raw_data(slice), bytes_to_write) - if bytes_written == -1 { - return bytes_written_total, 1 - } - bytes_written_total += bytes_written - } + slice := data[bytes_written_total:bytes_written_total + bytes_to_write] + bytes_written := _unix_write(fd, raw_data(slice), bytes_to_write) + if bytes_written == -1 { + return bytes_written_total, 1 + } + bytes_written_total += bytes_written + } return bytes_written_total, 0 }