aboutsummaryrefslogtreecommitdiff
path: root/stdlib
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 /stdlib
parent8e254d8e0d0820716e0ccf5f2b89c4fd1325f051 (diff)
downloadglibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.zip
glibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.tar.gz
glibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.tar.bz2
Avoid use of "register" as optimization hint.
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/qsort.c8
-rw-r--r--stdlib/setenv.c4
-rw-r--r--stdlib/strtod_l.c13
-rw-r--r--stdlib/strtol_l.c10
-rw-r--r--stdlib/tst-strtod.c4
-rw-r--r--stdlib/tst-strtol.c6
-rw-r--r--stdlib/tst-strtoll.c6
7 files changed, 25 insertions, 26 deletions
diff --git a/stdlib/qsort.c b/stdlib/qsort.c
index ccbdccc..471c662 100644
--- a/stdlib/qsort.c
+++ b/stdlib/qsort.c
@@ -29,8 +29,8 @@
#define SWAP(a, b, size) \
do \
{ \
- register size_t __size = (size); \
- register char *__a = (a), *__b = (b); \
+ size_t __size = (size); \
+ char *__a = (a), *__b = (b); \
do \
{ \
char __tmp = *__a; \
@@ -89,7 +89,7 @@ void
_quicksort (void *const pbase, size_t total_elems, size_t size,
__compar_d_fn_t cmp, void *arg)
{
- register char *base_ptr = (char *) pbase;
+ char *base_ptr = (char *) pbase;
const size_t max_thresh = MAX_THRESH * size;
@@ -206,7 +206,7 @@ _quicksort (void *const pbase, size_t total_elems, size_t size,
char *const end_ptr = &base_ptr[size * (total_elems - 1)];
char *tmp_ptr = base_ptr;
char *thresh = min(end_ptr, base_ptr + max_thresh);
- register char *run_ptr;
+ char *run_ptr;
/* Find smallest element in first threshold and place it at the
array's beginning. This is the smallest array element,
diff --git a/stdlib/setenv.c b/stdlib/setenv.c
index a9ebe33..fdcd8e1 100644
--- a/stdlib/setenv.c
+++ b/stdlib/setenv.c
@@ -112,8 +112,8 @@ __add_to_environ (name, value, combined, replace)
const char *combined;
int replace;
{
- register char **ep;
- register size_t size;
+ char **ep;
+ size_t size;
const size_t namelen = strlen (name);
const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index 2eec876..5b41e2b 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -1175,10 +1175,9 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
really integer digits or belong to the fractional part; i.e. we normalize
123e-2 to 1.23. */
{
- register intmax_t incr = (exponent < 0
- ? MAX (-(intmax_t) int_no, exponent)
- : MIN ((intmax_t) dig_no - (intmax_t) int_no,
- exponent));
+ intmax_t incr = (exponent < 0
+ ? MAX (-(intmax_t) int_no, exponent)
+ : MIN ((intmax_t) dig_no - (intmax_t) int_no, exponent));
int_no += incr;
exponent -= incr;
}
@@ -1499,7 +1498,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
#define got_limb \
if (bits == 0) \
{ \
- register int cnt; \
+ int cnt; \
if (quot == 0) \
cnt = BITS_PER_MP_LIMB; \
else \
@@ -1651,7 +1650,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
if (numsize < densize)
{
mp_size_t empty = densize - numsize;
- register int i;
+ int i;
if (bits <= 0)
exponent -= empty * BITS_PER_MP_LIMB;
@@ -1679,7 +1678,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
used = MANT_DIG - bits;
if (used >= BITS_PER_MP_LIMB)
{
- register int i;
+ int i;
(void) __mpn_lshift (&retval[used
/ BITS_PER_MP_LIMB],
retval,
diff --git a/stdlib/strtol_l.c b/stdlib/strtol_l.c
index 874708a..dc47608 100644
--- a/stdlib/strtol_l.c
+++ b/stdlib/strtol_l.c
@@ -231,11 +231,11 @@ INTERNAL (__strtol_l) (nptr, endptr, base, group, loc)
__locale_t loc;
{
int negative;
- register unsigned LONG int cutoff;
- register unsigned int cutlim;
- register unsigned LONG int i;
- register const STRING_TYPE *s;
- register UCHAR_TYPE c;
+ unsigned LONG int cutoff;
+ unsigned int cutlim;
+ unsigned LONG int i;
+ const STRING_TYPE *s;
+ UCHAR_TYPE c;
const STRING_TYPE *save, *end;
int overflow;
#ifndef USE_WIDE_CHAR
diff --git a/stdlib/tst-strtod.c b/stdlib/tst-strtod.c
index 0154aad..acd1377 100644
--- a/stdlib/tst-strtod.c
+++ b/stdlib/tst-strtod.c
@@ -85,7 +85,7 @@ int
main (int argc, char ** argv)
{
char buf[100];
- register const struct ltest *lt;
+ const struct ltest *lt;
char *ep;
int status = 0;
int save_errno;
@@ -184,7 +184,7 @@ main (int argc, char ** argv)
static void
expand (dst, c)
char *dst;
- register int c;
+ int c;
{
if (isprint (c))
{
diff --git a/stdlib/tst-strtol.c b/stdlib/tst-strtol.c
index f569e55..eebd8f7 100644
--- a/stdlib/tst-strtol.c
+++ b/stdlib/tst-strtol.c
@@ -537,14 +537,14 @@ static void expand (char *dst, int c);
int
main (void)
{
- register const struct ltest *lt;
+ const struct ltest *lt;
char *ep;
int status = 0;
int save_errno;
for (lt = tests; lt->str != NULL; ++lt)
{
- register long int l;
+ long int l;
errno = 0;
l = strtol (lt->str, &ep, lt->base);
@@ -577,7 +577,7 @@ main (void)
for (++lt; lt->str != NULL; lt++)
{
- register unsigned long int ul;
+ unsigned long int ul;
errno = 0;
ul = strtoul (lt->str, &ep, lt->base);
diff --git a/stdlib/tst-strtoll.c b/stdlib/tst-strtoll.c
index ba33382..0c77254 100644
--- a/stdlib/tst-strtoll.c
+++ b/stdlib/tst-strtoll.c
@@ -312,14 +312,14 @@ static void expand (char *dst, int c);
int
main (void)
{
- register const struct ltest *lt;
+ const struct ltest *lt;
char *ep;
int status = 0;
int save_errno;
for (lt = tests; lt->str != NULL; ++lt)
{
- register long long int l;
+ long long int l;
errno = 0;
l = strtoll (lt->str, &ep, lt->base);
@@ -352,7 +352,7 @@ main (void)
for (++lt; lt->str != NULL; lt++)
{
- register unsigned long long int ul;
+ unsigned long long int ul;
errno = 0;
ul = strtoull (lt->str, &ep, lt->base);