diff options
author | deraadt <> | 2014-11-30 19:43:57 +0000 |
---|---|---|
committer | deraadt <> | 2014-11-30 19:43:57 +0000 |
commit | 3539e3fa3e1f8ac6b4177476a424681e58c76af5 (patch) | |
tree | 82fa98088bf55df432f5bac1dd59e9f100a1cac9 /src/lib/libc/string/rindex.c | |
parent | c65fff479ff8dc713956bcf5d92883f19a479d84 (diff) | |
download | openbsd-3539e3fa3e1f8ac6b4177476a424681e58c76af5.tar.gz openbsd-3539e3fa3e1f8ac6b4177476a424681e58c76af5.tar.bz2 openbsd-3539e3fa3e1f8ac6b4177476a424681e58c76af5.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 'src/lib/libc/string/rindex.c')
-rw-r--r-- | src/lib/libc/string/rindex.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/libc/string/rindex.c b/src/lib/libc/string/rindex.c index bf9d6f7cf1..23716f6af3 100644 --- a/src/lib/libc/string/rindex.c +++ b/src/lib/libc/string/rindex.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rindex.c,v 1.6 2005/08/08 08:05:37 espie Exp $ */ | 1 | /* $OpenBSD: rindex.c,v 1.7 2014/11/30 19:43:56 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1988 Regents of the University of California. | 3 | * Copyright (c) 1988 Regents of the University of California. |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -31,11 +31,7 @@ | |||
31 | #include <string.h> | 31 | #include <string.h> |
32 | 32 | ||
33 | char * | 33 | char * |
34 | #ifdef STRRCHR | ||
35 | strrchr(const char *p, int ch) | ||
36 | #else | ||
37 | rindex(const char *p, int ch) | 34 | rindex(const char *p, int ch) |
38 | #endif | ||
39 | { | 35 | { |
40 | char *save; | 36 | char *save; |
41 | 37 | ||