Skip to content
Snippets Groups Projects
user avatar
Kir Kolyshkin authored
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: default avatarIan Lance Taylor <iant@google.com>
Reviewed-by: default avatarTobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarCherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
4a9d98d4
History
Name Last commit Last update