Remove returned bool from access and faccessat in sys/linux.

Switch to using AT_EMPTY_PATH to execve with file descriptors.
This commit is contained in:
jason committed 2024-08-04 00:59:40 -04:00
1 parent 2b89829b52
commit 2a7db08c20
3 files changed
+45 -24

No files matched your search

+1 -2
View File
@@ -386,8 +386,7 @@ _fchtimes :: proc(f: ^File, atime, mtime: time.Time) -> Error {
_exists :: proc(name: string) -> bool {
TEMP_ALLOCATOR_GUARD()
name_cstr, _ := temp_cstring(name)
res, errno := linux.access(name_cstr, linux.F_OK)
return !res && errno == .NONE
return linux.access(name_cstr, linux.F_OK) == .NONE
}
/* For reading Linux system files that stat to size 0 */