diff options
Diffstat (limited to 'kern/strings.c')
-rw-r--r-- | kern/strings.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kern/strings.c b/kern/strings.c index 3676f98e..e299534a 100644 --- a/kern/strings.c +++ b/kern/strings.c @@ -50,15 +50,15 @@ * the contents are identical up to the length of s2. * It returns < 0 if the first differing character is smaller * in s1 than in s2 or if s1 is shorter than s2 and the - * contents are identical upto the length of s1. + * contents are identical up to the length of s1. */ -int +int __attribute__ ((pure)) strcmp( - register const char *s1, - register const char *s2) + const char *s1, + const char *s2) { - register unsigned int a, b; + unsigned int a, b; do { a = *s1++; @@ -80,13 +80,13 @@ strcmp( * comparison runs for at most "n" characters. */ -int +int __attribute__ ((pure)) strncmp( - register const char *s1, - register const char *s2, + const char *s1, + const char *s2, size_t n) { - register unsigned int a, b; + unsigned int a, b; while (n != 0) { a = *s1++; @@ -113,10 +113,10 @@ strncmp( char * strcpy( - register char *to, - register const char *from) + char *to, + const char *from) { - register char *ret = to; + char *ret = to; while ((*to++ = *from++) != '\0') continue; @@ -135,11 +135,11 @@ strcpy( char * strncpy( - register char *to, - register const char *from, - register size_t count) + char *to, + const char *from, + size_t count) { - register char *ret = to; + char *ret = to; while (count != 0) { count--; @@ -157,15 +157,15 @@ strncpy( /* * Abstract: - * strlen returns the number of characters in "string" preceeding + * strlen returns the number of characters in "string" preceding * the terminating null character. */ -size_t +size_t __attribute__ ((pure)) strlen( - register const char *string) + const char *string) { - register const char *ret = string; + const char *ret = string; while (*string++ != '\0') continue; |