commit 0914984fe8a45e5928b4f975ee7530574452f19d
Author:     Quentin Rameau <quinq@fifth.space>
AuthorDate: Tue Jun 21 21:09:12 2016 +0200
Commit:     Quentin Rameau <quinq@fifth.space>
CommitDate: Tue Jun 21 21:09:12 2016 +0200

    [cc2] fix calloc call in nextpc()
    
    I forgot to modify the function call and to include the correct header
    in previous 92ec299 commit.

diff --git a/cc2/code.c b/cc2/code.c
index 35c4041..8d4bc69 100644
--- a/cc2/code.c
+++ b/cc2/code.c
@@ -1,6 +1,7 @@
 /* See LICENSE file for copyright and license details. */
 #include <stdlib.h>
 
+#include "../inc/cc.h"
 #include "arch.h"
 #include "cc2.h"
 
@@ -11,7 +12,7 @@ nextpc(void)
 {
         Inst *new;
 
-        new = xcalloc(sizeof(*new)); /* TODO: create an arena */
+        new = xcalloc(1, sizeof(*new)); /* TODO: create an arena */
 
         if (!pc) {
                 prog = new;

Reply via email to