From 23e68ead137278ea976e4485c3571ca7f4c2f157 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 1 Dec 2013 17:41:12 +0000 Subject: replace malloc with calloc --- bf.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bf.c b/bf.c index 1903c38..f15d3fc 100644 --- a/bf.c +++ b/bf.c @@ -35,13 +35,9 @@ alloccell(void) { Cell *c; - c = malloc(sizeof(Cell)); + c = calloc(1, sizeof(Cell)); assert(c); - c->value = 0; - c->next = NULL; - c->prev = NULL; - return c; } -- cgit v1.2.3