From ac184957db5523553923f6dbad1bc1eb227da090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Aleksi=C4=87?= Date: Thu, 21 Jan 2021 20:55:58 +0100 Subject: [PATCH] Fix CI --- core/os/dir_linux.odin | 5 ++--- core/os/os_linux.odin | 9 +++------ 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/core/os/dir_linux.odin b/core/os/dir_linux.odin index 8d988405c..dc6bce390 100644 --- a/core/os/dir_linux.odin +++ b/core/os/dir_linux.odin @@ -1,6 +1,5 @@ package os -import "core:strconv" import "core:strings" import "core:mem" @@ -53,8 +52,8 @@ read_dir :: proc(fd: Handle, n: int, allocator := context.allocator) -> (fi: []F fi_, err = stat(fullpath); if err != ERROR_NONE { - for fi_ in dfi { - file_info_delete(fi_); + for fi__ in dfi { + file_info_delete(fi__); } delete(dfi); return; diff --git a/core/os/os_linux.odin b/core/os/os_linux.odin index f8523cfd4..d7cd291e1 100644 --- a/core/os/os_linux.odin +++ b/core/os/os_linux.odin @@ -5,9 +5,8 @@ foreign import libc "system:c" import "core:runtime" import "core:strings" -import "core:strconv" import "core:c" -import "core:mem" +import "core:strconv" Handle :: distinct i32; File_Time :: distinct u64; @@ -492,7 +491,7 @@ _readlink :: inline proc(path: string) -> (string, Errno) { // NOTE(laleksic, 2021-01-21): Any cleaner way to resize the slice? bufsz *= 2; delete(buf); - buf := make([]byte, bufsz); + buf = make([]byte, bufsz); } else { return strings.string_from_ptr(&buf[0], rc), ERROR_NONE; } @@ -500,7 +499,7 @@ _readlink :: inline proc(path: string) -> (string, Errno) { } absolute_path_from_handle :: proc(fd: Handle) -> (string, Errno) { - buf: [256]byte; + buf : [256]byte; fd_str := strconv.itoa( buf[:], cast(int)fd ); procfs_path := strings.concatenate( []string{ "/proc/self/fd/", fd_str } ); @@ -510,8 +509,6 @@ absolute_path_from_handle :: proc(fd: Handle) -> (string, Errno) { } absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) { - ta := context.temp_allocator; - rel := rel; if rel == "" { rel = ".";