[hackers] [scc] [cc1] Change name of variable in typesize() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Thu, 1 Dec 2016 09:44:14 +0100 (CET)

commit 27b5cb7089f903689568e99e95e3b32dd7fce2e6
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Thu Dec 1 09:07:55 2016 +0100
Commit: damia <alejandro.berna_AT_sener.es>
CommitDate: Thu Dec 1 09:38:03 2016 +0100

    [cc1] Change name of variable in typesize()
    
    The scope of the variable was to big to use aux for it,
    and it was hard to follow the code because it was not
    clear was 'aux' meant.

diff --git a/cc1/types.c b/cc1/types.c
index df44f4d..c750604 100644
--- a/cc1/types.c
+++ b/cc1/types.c
_AT_@ -173,7 +173,7 @@ void
 typesize(Type *tp)
 {
         Symbol **sp;
- Type *aux;
+ Type *type;
         unsigned long size, offset;
         int align, a;
         TINT n;
_AT_@ -202,18 +202,18 @@ typesize(Type *tp)
                 n = tp->n.elem;
                 for (sp = tp->p.fields; n--; ++sp) {
                         (*sp)->u.i = offset;
- aux = (*sp)->type;
- a = aux->align;
+ type = (*sp)->type;
+ a = type->align;
                         if (a > align)
                                 align = a;
                         if (tp->op == STRUCT) {
                                 if (--a != 0)
                                         size = (size + a) & ~a;
- size += aux->size;
+ size += type->size;
                                 offset = size;
                         } else {
- if (aux->size > size)
- size = aux->size;
+ if (type->size > size)
+ size = type->size;
                         }
                 }
 
Received on Thu Dec 01 2016 - 09:44:14 CET

This archive was generated by hypermail 2.3.0 : Thu Dec 01 2016 - 09:48:16 CET