diff options
Diffstat (limited to 'src/lib/libc/string/strlen.c')
| -rw-r--r-- | src/lib/libc/string/strlen.c | 17 | 
1 files changed, 10 insertions, 7 deletions
| diff --git a/src/lib/libc/string/strlen.c b/src/lib/libc/string/strlen.c index 332d5766f9..ab006e04c2 100644 --- a/src/lib/libc/string/strlen.c +++ b/src/lib/libc/string/strlen.c | |||
| @@ -1,6 +1,8 @@ | |||
| 1 | /* $OpenBSD: strlen.c,v 1.4 2001/07/29 21:15:23 millert Exp $ */ | ||
| 2 | |||
| 1 | /*- | 3 | /*- | 
| 2 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990, 1993 | 
| 3 | * All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | 
| 4 | * | 6 | * | 
| 5 | * Redistribution and use in source and binary forms, with or without | 7 | * Redistribution and use in source and binary forms, with or without | 
| 6 | * modification, are permitted provided that the following conditions | 8 | * modification, are permitted provided that the following conditions | 
| @@ -32,10 +34,10 @@ | |||
| 32 | */ | 34 | */ | 
| 33 | 35 | ||
| 34 | #if defined(LIBC_SCCS) && !defined(lint) | 36 | #if defined(LIBC_SCCS) && !defined(lint) | 
| 35 | static char *rcsid = "$OpenBSD: strlen.c,v 1.3 1996/08/19 08:34:19 tholo Exp $"; | 37 | static char *rcsid = "$OpenBSD: strlen.c,v 1.4 2001/07/29 21:15:23 millert Exp $"; | 
| 36 | #endif /* LIBC_SCCS and not lint */ | 38 | #endif /* LIBC_SCCS and not lint */ | 
| 37 | 39 | ||
| 38 | #ifndef _KERNEL | 40 | #if !defined(_KERNEL) && !defined(_STANDALONE) | 
| 39 | #include <string.h> | 41 | #include <string.h> | 
| 40 | #else | 42 | #else | 
| 41 | #include <lib/libkern/libkern.h> | 43 | #include <lib/libkern/libkern.h> | 
| @@ -45,9 +47,10 @@ size_t | |||
| 45 | strlen(str) | 47 | strlen(str) | 
| 46 | const char *str; | 48 | const char *str; | 
| 47 | { | 49 | { | 
| 48 | register const char *s; | 50 | const char *s; | 
| 49 | 51 | ||
| 50 | for (s = str; *s; ++s); | 52 | for (s = str; *s; ++s) | 
| 51 | return(s - str); | 53 | ; | 
| 54 | return (s - str); | ||
| 52 | } | 55 | } | 
| 53 | 56 | ||
