rename nul to null, allocation clarifications

This commit is contained in:
Jon Lipstate
2023-03-28 11:51:39 -07:00
parent 6dce07790a
commit 194fa7cd98
4 changed files with 49 additions and 46 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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)