scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 27b5cb7089f903689568e99e95e3b32dd7fce2e6
parent 821f4c28e2e9ae7404e87b9e04047b5273dfda1b
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu,  1 Dec 2016 09:07:55 +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.

Diffstat:
Mcc1/types.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 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; } }