aboutsummaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorJon Lipstate <Jon@Lipstate.com>2023-03-28 11:51:39 -0700
committerJon Lipstate <Jon@Lipstate.com>2023-03-28 11:51:39 -0700
commit194fa7cd983596e788997948271b4bc836ffaaa4 (patch)
tree0078f039be344f41793e9828b1b8115d76b403f8 /core/os
parent6dce07790a9311f87356ba5a07b6051b0e17ebe8 (diff)
rename nul to null, allocation clarifications
Diffstat (limited to 'core/os')
-rw-r--r--core/os/os2/path_linux.odin2
-rw-r--r--core/os/os_linux.odin2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/os/os2/path_linux.odin b/core/os/os2/path_linux.odin
index 60161f496..e4c92a871 100644
--- a/core/os/os2/path_linux.odin
+++ b/core/os/os2/path_linux.odin
@@ -211,7 +211,7 @@ _getwd :: proc(allocator: runtime.Allocator) -> (string, Error) {
#no_bounds_check res := unix.sys_getcwd(&buf[0], uint(len(buf)))
if res >= 0 {
- return strings.string_from_nul_terminated_ptr(&buf[0], len(buf)), nil
+ return strings.string_from_zero_terminated_ptr(&buf[0], len(buf)), nil
}
if res != -ERANGE {
return "", _get_platform_error(res)
diff --git a/core/os/os_linux.odin b/core/os/os_linux.odin
index d001d5ec7..0e2af6609 100644
--- a/core/os/os_linux.odin
+++ b/core/os/os_linux.odin
@@ -913,7 +913,7 @@ get_current_directory :: proc() -> string {
#no_bounds_check res := unix.sys_getcwd(&buf[0], uint(len(buf)))
if res >= 0 {
- return strings.string_from_nul_terminated_ptr(&buf[0], len(buf))
+ return strings.string_from_zero_terminated_ptr(&buf[0], len(buf))
}
if _get_errno(res) != ERANGE {
delete(buf)