register removal from /usr/src/sbin/rcorder/hash.c

Liam J. Foy liamfoy at sepulcrum.org
Wed Dec 1 11:45:54 PST 2004


On Wed, 2004-12-01 at 19:35 +0000, Steve Mynott wrote:
> patch attempt 2 (correct way around)
> 
> --- hash.c.bak  2004-12-01 19:28:32.000000000 +0000
> +++ hash.c      2004-12-01 19:28:41.000000000 +0000
> @@ -103,7 +103,7 @@
>   */
> 
>  /*
> - * register Hash_Table *t;     Structure to use to hold table.
> + * Hash_Table *t;      Structure to use to hold table.
>   * int numBuckets;                     How many buckets to create for starters.
>   *                                                             This number is r
> ounded up to a power of
>   *                                                             two.   If <= 0,
> a reasonable default is
> @@ -111,10 +111,10 @@
>   *                                                             as needed.
>   */
>  void
> -Hash_InitTable(register Hash_Table *t, int numBuckets)
> +Hash_InitTable(Hash_Table *t, int numBuckets)
>  {
> -       register int i;
> -       register struct Hash_Entry **hp;
> +       int i;
> +       struct Hash_Entry **hp;
> 
>         /*
>          * Round up the size to a power of two.
> @@ -154,8 +154,8 @@
>  void
>  Hash_DeleteTable(Hash_Table *t)
>  {
> -       register struct Hash_Entry **hp, *h, *nexth = NULL;
> -       register int i;
> +       struct Hash_Entry **hp, *h, *nexth = NULL;
> +       int i;
> 
>         for (hp = t->bucketPtr, i = t->size; --i >= 0;) {
>                 for (h = *hp++; h != NULL; h = nexth) {
> @@ -193,9 +193,9 @@
>  Hash_Entry *
>  Hash_FindEntry(Hash_Table *t, char *key)
>  {
> -       register Hash_Entry *e;
> -       register unsigned h;
> -       register char *p;
> +       Hash_Entry *e;
> +       unsigned h;
> +       char *p;
> 
>         for (h = 0, p = key; *p;)
>                 h = (h << 5) - h + *p++;
> @@ -226,11 +226,11 @@
>   */
> 
>  Hash_Entry *
> -Hash_CreateEntry(register Hash_Table *t, char *key, Boolean *newPtr)
> +Hash_CreateEntry(Hash_Table *t, char *key, Boolean *newPtr)
>  {
> -       register Hash_Entry *e;
> -       register unsigned h;
> -       register char *p;
> +       Hash_Entry *e;
> +       unsigned h;
> +       char *p;
>         int keylen;
>         struct Hash_Entry **hp;
> 
> @@ -291,7 +291,7 @@
>  void
>  Hash_DeleteEntry(Hash_Table *t, Hash_Entry *e)
>  {
> -       register Hash_Entry **hp, *p;
> +       Hash_Entry **hp, *p;
> 
>         if (e == NULL)
>                 return;
> @@ -328,7 +328,7 @@
>   */
> 
>  Hash_Entry *
> -Hash_EnumFirst(Hash_Table *t, register Hash_Search *searchPtr)
> +Hash_EnumFirst(Hash_Table *t, Hash_Search *searchPtr)
>  {
>         searchPtr->tablePtr = t;
>         searchPtr->nextIndex = 0;
> @@ -355,9 +355,9 @@
>   */
> 
>  Hash_Entry *
> -Hash_EnumNext(register Hash_Search *searchPtr)
> +Hash_EnumNext(Hash_Search *searchPtr)
>  {
> -       register Hash_Entry *e;
> +       Hash_Entry *e;
>         Hash_Table *t = searchPtr->tablePtr;
> 
>         /*
> @@ -399,11 +399,11 @@
>   */
> 
>  static void
> -RebuildTable(register Hash_Table *t)
> +RebuildTable(Hash_Table *t)
>  {
> -       register Hash_Entry *e, *next = NULL, **hp, **xp;
> -       register int i, mask;
> -        register Hash_Entry **oldhp;
> +       Hash_Entry *e, *next = NULL, **hp, **xp;
> +       int i, mask;
> +        Hash_Entry **oldhp;
>         int oldsize;
> 
>         oldhp = t->bucketPtr;

Committed! Thanks

-- 
Liam J. Foy
<liamfoy at xxxxxxxxxxxxx>







More information about the Submit mailing list