diff options
Diffstat (limited to 'src/lib/libc/string/strstr.c')
| -rw-r--r-- | src/lib/libc/string/strstr.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/lib/libc/string/strstr.c b/src/lib/libc/string/strstr.c index 1ed59e357b..e6a94c5ce6 100644 --- a/src/lib/libc/string/strstr.c +++ b/src/lib/libc/string/strstr.c | |||
| @@ -13,11 +13,7 @@ | |||
| 13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright |
| 14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the |
| 15 | * documentation and/or other materials provided with the distribution. | 15 | * documentation and/or other materials provided with the distribution. |
| 16 | * 3. All advertising materials mentioning features or use of this software | 16 | * 3. Neither the name of the University nor the names of its contributors |
| 17 | * must display the following acknowledgement: | ||
| 18 | * This product includes software developed by the University of | ||
| 19 | * California, Berkeley and its contributors. | ||
| 20 | * 4. Neither the name of the University nor the names of its contributors | ||
| 21 | * may be used to endorse or promote products derived from this software | 17 | * may be used to endorse or promote products derived from this software |
| 22 | * without specific prior written permission. | 18 | * without specific prior written permission. |
| 23 | * | 19 | * |
| @@ -35,8 +31,7 @@ | |||
| 35 | */ | 31 | */ |
| 36 | 32 | ||
| 37 | #if defined(LIBC_SCCS) && !defined(lint) | 33 | #if defined(LIBC_SCCS) && !defined(lint) |
| 38 | /*static char *sccsid = "from: @(#)strstr.c 5.2 (Berkeley) 1/26/91";*/ | 34 | static char *rcsid = "$OpenBSD: strstr.c,v 1.4 2003/06/11 21:08:16 deraadt Exp $"; |
| 39 | static char *rcsid = "$Id: strstr.c,v 1.1.1.1 1995/10/18 08:42:23 deraadt Exp $"; | ||
| 40 | #endif /* LIBC_SCCS and not lint */ | 35 | #endif /* LIBC_SCCS and not lint */ |
| 41 | 36 | ||
| 42 | #include <string.h> | 37 | #include <string.h> |
| @@ -45,11 +40,10 @@ static char *rcsid = "$Id: strstr.c,v 1.1.1.1 1995/10/18 08:42:23 deraadt Exp $" | |||
| 45 | * Find the first occurrence of find in s. | 40 | * Find the first occurrence of find in s. |
| 46 | */ | 41 | */ |
| 47 | char * | 42 | char * |
| 48 | strstr(s, find) | 43 | strstr(const char *s, const char *find) |
| 49 | register const char *s, *find; | ||
| 50 | { | 44 | { |
| 51 | register char c, sc; | 45 | char c, sc; |
| 52 | register size_t len; | 46 | size_t len; |
| 53 | 47 | ||
| 54 | if ((c = *find++) != 0) { | 48 | if ((c = *find++) != 0) { |
| 55 | len = strlen(find); | 49 | len = strlen(find); |
