[hackers] [scc] [cc2-qbe] Initialize children pointers in tmpnode() || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Fri, 20 Jan 2017 10:03:24 +0100 (CET)

commit ea128fec0a7ee10a849cab1876ce1641ffc1f340
Author: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
AuthorDate: Fri Jan 20 10:00:44 2017 +0100
Commit: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
CommitDate: Fri Jan 20 10:00:44 2017 +0100

    [cc2-qbe] Initialize children pointers in tmpnode()
    
    Not always them were initialized, mainly when it received
    a pointer to some already allocated node.

diff --git a/cc2/arch/qbe/cgen.c b/cc2/arch/qbe/cgen.c
index 26b3508..14b2a5f 100644
--- a/cc2/arch/qbe/cgen.c
+++ b/cc2/arch/qbe/cgen.c
_AT_@ -105,6 +105,7 @@ tmpnode(Node *np, Type *tp)
         sym = getsym(TMPSYM);
         sym->type = np->type = *tp;
         sym->kind = STMP;
+ np->left = np->right = NULL;
         np->u.sym = sym;
         np->op = OTMP;
         np->flags |= ISTMP;
Received on Fri Jan 20 2017 - 10:03:24 CET

This archive was generated by hypermail 2.3.0 : Fri Jan 20 2017 - 10:12:17 CET