[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] obstack: Remove register keyword from variables
From: |
Will Newton |
Subject: |
[PATCH 2/2] obstack: Remove register keyword from variables |
Date: |
Thu, 27 Mar 2014 17:24:18 +0000 |
The register keyword has not been useful for a long time, so
remove it to make the code easier to merge with glibc.
* lib/obstack.c (_obstack_begin, _obstack_newchunk,
_obstack_allocated_p, __obstack_free,
_obstack_memory_used): Remove register keyword.
---
lib/obstack.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/lib/obstack.c b/lib/obstack.c
index fb17e95..94b40de 100644
--- a/lib/obstack.c
+++ b/lib/obstack.c
@@ -142,7 +142,7 @@ _obstack_begin (struct obstack *h, int size, int alignment,
void *(*chunkfun) (long),
void (*freefun) (void *))
{
- register struct _obstack_chunk *chunk; /* points to new chunk */
+ struct _obstack_chunk *chunk; /* points to new chunk */
if (alignment == 0)
alignment = DEFAULT_ALIGNMENT;
@@ -188,7 +188,7 @@ _obstack_begin_1 (struct obstack *h, int size, int
alignment,
void (*freefun) (void *, void *),
void *arg)
{
- register struct _obstack_chunk *chunk; /* points to new chunk */
+ struct _obstack_chunk *chunk; /* points to new chunk */
if (alignment == 0)
alignment = DEFAULT_ALIGNMENT;
@@ -238,11 +238,11 @@ _obstack_begin_1 (struct obstack *h, int size, int
alignment,
void
_obstack_newchunk (struct obstack *h, int length)
{
- register struct _obstack_chunk *old_chunk = h->chunk;
- register struct _obstack_chunk *new_chunk;
- register long new_size;
- register long obj_size = h->next_free - h->object_base;
- register long i;
+ struct _obstack_chunk *old_chunk = h->chunk;
+ struct _obstack_chunk *new_chunk;
+ long new_size;
+ long obj_size = h->next_free - h->object_base;
+ long i;
long already;
char *object_base;
@@ -315,8 +315,8 @@ int _obstack_allocated_p (struct obstack *h, void *obj)
_GL_ATTRIBUTE_PURE;
int
_obstack_allocated_p (struct obstack *h, void *obj)
{
- register struct _obstack_chunk *lp; /* below addr of any objects in this
chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
+ struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ struct _obstack_chunk *plp; /* point to previous chunk if any */
lp = (h)->chunk;
/* We use >= rather than > since the object cannot be exactly at
@@ -338,8 +338,8 @@ _obstack_allocated_p (struct obstack *h, void *obj)
void
__obstack_free (struct obstack *h, void *obj)
{
- register struct _obstack_chunk *lp; /* below addr of any objects in this
chunk */
- register struct _obstack_chunk *plp; /* point to previous chunk if any */
+ struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ struct _obstack_chunk *plp; /* point to previous chunk if any */
lp = h->chunk;
/* We use >= because there cannot be an object at the beginning of a chunk.
@@ -374,8 +374,8 @@ strong_alias (obstack_free, _obstack_free)
int
_obstack_memory_used (struct obstack *h)
{
- register struct _obstack_chunk* lp;
- register int nbytes = 0;
+ struct _obstack_chunk* lp;
+ int nbytes = 0;
for (lp = h->chunk; lp != 0; lp = lp->prev)
{
--
1.8.1.4