diff options
author | 2014-11-30 19:43:54 +0000 | |
---|---|---|
committer | 2014-11-30 19:43:54 +0000 | |
commit | 5b859c19fe53bbea08f5c342e0a4470e99f883e1 (patch) | |
tree | 7252e6d2fe4779d5efa144101312151b0f8abeaa /lib/libc/string/rindex.c | |
parent | Mask out EFER_LMA when restoring saved EFER on zzz/ZZZ resume as it's a (diff) | |
download | wireguard-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.c | 6 |
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; |