commit db4b47c8a31166c48e65882949b4efc8d22c5378
parent 4f3f7801a2e5fdce901e6a8c1ff445d288772599
Author: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
Date: Sun, 25 Apr 2021 15:36:39 +0200
eliminate a redundant special case
Signed-off-by: Bor Grošelj Simić <bor.groseljsimic@telemach.net>
Diffstat:
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/type_store.c b/src/type_store.c
@@ -403,15 +403,11 @@ tagged_init(struct type *type, struct type_tagged_union **tu, size_t nmemb)
next = &tu[i]->next;
}
- if (type->align == 0) {
+ if (type->align < builtin_type_uint.align) {
type->align = builtin_type_uint.align;
}
-
type->size += builtin_type_uint.size % type->align
+ builtin_type_uint.align;
- if (type->align < builtin_type_uint.align) {
- type->align = builtin_type_uint.align;
- }
return nmemb;
}