summary refs log tree commit diff
path: root/string
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-06-07 22:24:35 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-06-07 22:24:35 +0000
commit2e09a79ada1f6d92809a037d41895e3d9302ad59 (patch)
tree999c9d18279a7de289937116273ae4016356aa3a /string
parent8e254d8e0d0820716e0ccf5f2b89c4fd1325f051 (diff)
downloadglibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.tar.gz
glibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.tar.xz
glibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.zip
Avoid use of "register" as optimization hint.
Diffstat (limited to 'string')
-rw-r--r--string/bits/string2.h26
-rw-r--r--string/memccpy.c8
-rw-r--r--string/stpcpy.c4
-rw-r--r--string/strcmp.c4
-rw-r--r--string/strrchr.c2
5 files changed, 22 insertions, 22 deletions
diff --git a/string/bits/string2.h b/string/bits/string2.h
index ddd1c045a0..9369a7c4d9 100644
--- a/string/bits/string2.h
+++ b/string/bits/string2.h
@@ -839,7 +839,7 @@ __stpcpy_small (char *__dest,
 # endif
 
 # define __strcmp_cc(s1, s2, l) \
-  (__extension__ ({ register int __result =				      \
+  (__extension__ ({ int __result =					      \
 		      (((const unsigned char *) (const char *) (s1))[0]	      \
 		       - ((const unsigned char *) (const char *)(s2))[0]);    \
 		    if (l > 0 && __result == 0)				      \
@@ -868,7 +868,7 @@ __stpcpy_small (char *__dest,
 # define __strcmp_cg(s1, s2, l1) \
   (__extension__ ({ const unsigned char *__s2 =				      \
 		      (const unsigned char *) (const char *) (s2);	      \
-		    register int __result =				      \
+		    int __result =					      \
 		      (((const unsigned char *) (const char *) (s1))[0]	      \
 		       - __s2[0]);					      \
 		    if (l1 > 0 && __result == 0)			      \
@@ -946,7 +946,7 @@ __STRING_INLINE size_t __strcspn_c1 (const char *__s, int __reject);
 __STRING_INLINE size_t
 __strcspn_c1 (const char *__s, int __reject)
 {
-  register size_t __result = 0;
+  size_t __result = 0;
   while (__s[__result] != '\0' && __s[__result] != __reject)
     ++__result;
   return __result;
@@ -957,7 +957,7 @@ __STRING_INLINE size_t __strcspn_c2 (const char *__s, int __reject1,
 __STRING_INLINE size_t
 __strcspn_c2 (const char *__s, int __reject1, int __reject2)
 {
-  register size_t __result = 0;
+  size_t __result = 0;
   while (__s[__result] != '\0' && __s[__result] != __reject1
 	 && __s[__result] != __reject2)
     ++__result;
@@ -970,7 +970,7 @@ __STRING_INLINE size_t
 __strcspn_c3 (const char *__s, int __reject1, int __reject2,
 	      int __reject3)
 {
-  register size_t __result = 0;
+  size_t __result = 0;
   while (__s[__result] != '\0' && __s[__result] != __reject1
 	 && __s[__result] != __reject2 && __s[__result] != __reject3)
     ++__result;
@@ -1022,7 +1022,7 @@ __STRING_INLINE size_t __strspn_c1 (const char *__s, int __accept);
 __STRING_INLINE size_t
 __strspn_c1 (const char *__s, int __accept)
 {
-  register size_t __result = 0;
+  size_t __result = 0;
   /* Please note that __accept never can be '\0'.  */
   while (__s[__result] == __accept)
     ++__result;
@@ -1034,7 +1034,7 @@ __STRING_INLINE size_t __strspn_c2 (const char *__s, int __accept1,
 __STRING_INLINE size_t
 __strspn_c2 (const char *__s, int __accept1, int __accept2)
 {
-  register size_t __result = 0;
+  size_t __result = 0;
   /* Please note that __accept1 and __accept2 never can be '\0'.  */
   while (__s[__result] == __accept1 || __s[__result] == __accept2)
     ++__result;
@@ -1046,7 +1046,7 @@ __STRING_INLINE size_t __strspn_c3 (const char *__s, int __accept1,
 __STRING_INLINE size_t
 __strspn_c3 (const char *__s, int __accept1, int __accept2, int __accept3)
 {
-  register size_t __result = 0;
+  size_t __result = 0;
   /* Please note that __accept1 to __accept3 never can be '\0'.  */
   while (__s[__result] == __accept1 || __s[__result] == __accept2
 	 || __s[__result] == __accept3)
@@ -1198,7 +1198,7 @@ __STRING_INLINE char *__strsep_1c (char **__s, char __reject);
 __STRING_INLINE char *
 __strsep_1c (char **__s, char __reject)
 {
-  register char *__retval = *__s;
+  char *__retval = *__s;
   if (__retval != NULL && (*__s = strchr (__retval, __reject)) != NULL)
     *(*__s)++ = '\0';
   return __retval;
@@ -1208,10 +1208,10 @@ __STRING_INLINE char *__strsep_2c (char **__s, char __reject1, char __reject2);
 __STRING_INLINE char *
 __strsep_2c (char **__s, char __reject1, char __reject2)
 {
-  register char *__retval = *__s;
+  char *__retval = *__s;
   if (__retval != NULL)
     {
-      register char *__cp = __retval;
+      char *__cp = __retval;
       while (1)
 	{
 	  if (*__cp == '\0')
@@ -1236,10 +1236,10 @@ __STRING_INLINE char *__strsep_3c (char **__s, char __reject1, char __reject2,
 __STRING_INLINE char *
 __strsep_3c (char **__s, char __reject1, char __reject2, char __reject3)
 {
-  register char *__retval = *__s;
+  char *__retval = *__s;
   if (__retval != NULL)
     {
-      register char *__cp = __retval;
+      char *__cp = __retval;
       while (1)
 	{
 	  if (*__cp == '\0')
diff --git a/string/memccpy.c b/string/memccpy.c
index d2c024427d..2a3303221a 100644
--- a/string/memccpy.c
+++ b/string/memccpy.c
@@ -30,10 +30,10 @@ __memccpy (dest, src, c, n)
       int c;
       size_t n;
 {
-  register const char *s = src;
-  register char *d = dest;
-  register const char x = c;
-  register size_t i = n;
+  const char *s = src;
+  char *d = dest;
+  const char x = c;
+  size_t i = n;
 
   while (i-- > 0)
     if ((*d++ = *s++) == x)
diff --git a/string/stpcpy.c b/string/stpcpy.c
index 93e251081d..8ece3d9a78 100644
--- a/string/stpcpy.c
+++ b/string/stpcpy.c
@@ -34,8 +34,8 @@ __stpcpy (dest, src)
      char *dest;
      const char *src;
 {
-  register char *d = dest;
-  register const char *s = src;
+  char *d = dest;
+  const char *s = src;
 
   do
     *d++ = *s;
diff --git a/string/strcmp.c b/string/strcmp.c
index b7a53d3452..a4645638eb 100644
--- a/string/strcmp.c
+++ b/string/strcmp.c
@@ -28,8 +28,8 @@ strcmp (p1, p2)
      const char *p1;
      const char *p2;
 {
-  register const unsigned char *s1 = (const unsigned char *) p1;
-  register const unsigned char *s2 = (const unsigned char *) p2;
+  const unsigned char *s1 = (const unsigned char *) p1;
+  const unsigned char *s2 = (const unsigned char *) p2;
   unsigned char c1, c2;
 
   do
diff --git a/string/strrchr.c b/string/strrchr.c
index 2bf34991e8..bdec841c87 100644
--- a/string/strrchr.c
+++ b/string/strrchr.c
@@ -23,7 +23,7 @@
 char *
 strrchr (const char *s, int c)
 {
-  register const char *found, *p;
+  const char *found, *p;
 
   c = (unsigned char) c;