diff options
| author | Daniel Gerzo <danger@FreeBSD.org> | 2009-02-03 17:58:20 +0000 | 
|---|---|---|
| committer | Daniel Gerzo <danger@FreeBSD.org> | 2009-02-03 17:58:20 +0000 | 
| commit | bd604b4b064135e661660c045cd31145e2e4ce71 (patch) | |
| tree | c5d6de4ed720c8bb5b4d132f30cd8fbd28bbeb81 /lib/libc/string/strstr.c | |
| parent | 23ee18767ede4614aedbe8645e896f0194f3500c (diff) | |
Notes
Diffstat (limited to 'lib/libc/string/strstr.c')
| -rw-r--r-- | lib/libc/string/strstr.c | 7 | 
1 files changed, 3 insertions, 4 deletions
| diff --git a/lib/libc/string/strstr.c b/lib/libc/string/strstr.c index e2edd809c29f..82b4c5a2085e 100644 --- a/lib/libc/string/strstr.c +++ b/lib/libc/string/strstr.c @@ -42,17 +42,16 @@ __FBSDID("$FreeBSD$");   * Find the first occurrence of find in s.   */  char * -strstr(s, find) -	const char *s, *find; +strstr(const char *s, const char *find)  {  	char c, sc;  	size_t len; -	if ((c = *find++) != 0) { +	if ((c = *find++) != '\0') {  		len = strlen(find);  		do {  			do { -				if ((sc = *s++) == 0) +				if ((sc = *s++) == '\0')  					return (NULL);  			} while (sc != c);  		} while (strncmp(s, find, len) != 0); | 
