]> Cypherpunks repositories - gostls13.git/commit
syscall: optimize Getwd on aix
authorKir Kolyshkin <kolyshkin@gmail.com>
Tue, 20 Aug 2024 00:40:55 +0000 (17:40 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 21 Aug 2024 23:14:07 +0000 (23:14 +0000)
commit4a9d98d49a4f49672521973852fe8983ba790c5f
tree42f02409312b2dfe3f90999585ec4f26c0464c64
parentb5ee80a85ad1a0c5f3e87b95e516d4c6ca42fa4b
syscall: optimize Getwd on aix

When looking for \0, use clen which may be optimized.

Also, return EINVAL when returned string is empty.

This makes it similar to how it is implemented in *bsd and solaris.

Change-Id: I3e37ed25f47110eafd12c80291f7746de9db7b23
Reviewed-on: https://go-review.googlesource.com/c/go/+/606902
TryBot-Bypass: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
src/syscall/syscall_aix.go