aboutsummaryrefslogtreecommitdiff
path: root/src/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/term.c b/src/term.c
index aa7c17b..a301aa3 100644
--- a/src/term.c
+++ b/src/term.c
@@ -8,12 +8,13 @@
#include <log.h>
#include <term.h>
-struct term *term_new(term_type_t type)
+struct term *term_new(term_type_t type, hash_t hash)
{
- struct term *term = malloc(sizeof(*term));
+ struct term *term = calloc(sizeof(*term), 1);
if (!term)
fatal("out of memory!\n");
term->type = type;
+ term->hash = hash;
return term;
}