commit 27b5cb7089f903689568e99e95e3b32dd7fce2e6
Author:     Roberto E. Vargas Caballero <k...@shike2.com>
AuthorDate: Thu Dec 1 09:07:55 2016 +0100
Commit:     damia <alejandro.be...@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
@@ -173,7 +173,7 @@ void
 typesize(Type *tp)
 {
        Symbol **sp;
-       Type *aux;
+       Type *type;
        unsigned long size, offset;
        int align, a;
        TINT n;
@@ -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;
                        }
                }
 

Reply via email to