summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/index.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/index.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/index.c')
-rw-r--r--lib/libc/string/index.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libc/string/index.c b/lib/libc/string/index.c
index 50e9ca35abd..ebae15afe7e 100644
--- a/lib/libc/string/index.c
+++ b/lib/libc/string/index.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: index.c,v 1.5 2005/08/08 08:05:37 espie Exp $ */
+/* $OpenBSD: index.c,v 1.6 2014/11/30 19:43:56 deraadt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
@@ -31,11 +31,7 @@
#include <string.h>
char *
-#ifdef STRCHR
-strchr(const char *p, int ch)
-#else
index(const char *p, int ch)
-#endif
{
for (;; ++p) {
if (*p == ch)