summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strrchr.3
diff options
context:
space:
mode:
authormartijn <martijn@openbsd.org>2018-10-01 06:37:37 +0000
committermartijn <martijn@openbsd.org>2018-10-01 06:37:37 +0000
commit132394c01e18b19a7e7495ae67acb64f9c600cad (patch)
tree8b0166da0b527b58d16bec4c339db5eac1391ca7 /lib/libc/string/strrchr.3
parentupdate currency exchange rates; (diff)
downloadwireguard-openbsd-132394c01e18b19a7e7495ae67acb64f9c600cad.tar.xz
wireguard-openbsd-132394c01e18b19a7e7495ae67acb64f9c600cad.zip
As per POSIX, when str{,r}chr is comparing it should convert c to a char.
The C implementation of str{,r}chr are not linked to the build, because assembly implementations are used, but change to code for easier reference. At least the i386 and amd64 are checked and seem to do the correct thing. Found thanks to the csh any/strchr change. minor pointers and OK millert@
Diffstat (limited to 'lib/libc/string/strrchr.3')
-rw-r--r--lib/libc/string/strrchr.35
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/string/strrchr.3 b/lib/libc/string/strrchr.3
index f4ce691a6ea..5abb88ec70b 100644
--- a/lib/libc/string/strrchr.3
+++ b/lib/libc/string/strrchr.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: strrchr.3,v 1.11 2015/11/24 09:14:35 daniel Exp $
+.\" $OpenBSD: strrchr.3,v 1.12 2018/10/01 06:37:37 martijn Exp $
.\"
.\" Copyright (c) 1990, 1991 The Regents of the University of California.
.\" All rights reserved.
@@ -31,7 +31,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd $Mdocdate: November 24 2015 $
+.Dd $Mdocdate: October 1 2018 $
.Dt STRRCHR 3
.Os
.Sh NAME
@@ -50,6 +50,7 @@ The
.Fn strrchr
function locates the last occurrence of the character
.Fa c
+.Pq converted to a char
in the string
.Fa s .
The terminating