summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/rindex.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2014-11-30 19:43:54 +0000
committerderaadt <deraadt@openbsd.org>2014-11-30 19:43:54 +0000
commit5b859c19fe53bbea08f5c342e0a4470e99f883e1 (patch)
tree7252e6d2fe4779d5efa144101312151b0f8abeaa /lib/libc/string/rindex.c
parentMask out EFER_LMA when restoring saved EFER on zzz/ZZZ resume as it's a (diff)
downloadwireguard-openbsd-5b859c19fe53bbea08f5c342e0a4470e99f883e1.tar.xz
wireguard-openbsd-5b859c19fe53bbea08f5c342e0a4470e99f883e1.zip
restructure libc/string + libc/arch/*/string coperation regarding
(potentially) MD versions (function dependent, not filename dependent) split out memcpy/memmove/bcopy and strchr/index/strrchr/rindex Bring back amd64 .S versions And the final touch: switch all architectures temporarily to MI memcpy.c, which contains syslog + abort for overlapping copies. A nice harsh undefined behaviour. We will clean the entire userland of the remaining issues in this catagory, then switch to the optimised memcpy which skips the memmove check. I tried to cut this change into pieces, but testing each sub-step on every architecture is too time consuming and mindnumbing. ok miod
Diffstat (limited to 'lib/libc/string/rindex.c')
-rw-r--r--lib/libc/string/rindex.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libc/string/rindex.c b/lib/libc/string/rindex.c
index bf9d6f7cf12..23716f6af32 100644
--- a/lib/libc/string/rindex.c
+++ b/lib/libc/string/rindex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rindex.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */
+/* $OpenBSD: rindex.c,v 1.7 2014/11/30 19:43:56 deraadt Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
* All rights reserved.
@@ -31,11 +31,7 @@
#include <string.h>
char *
-#ifdef STRRCHR
-strrchr(const char *p, int ch)
-#else
rindex(const char *p, int ch)
-#endif
{
char *save;