summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2013-12-01 17:41:12 +0000
committerDimitri Sokolyuk <demon@dim13.org>2013-12-01 17:41:12 +0000
commit23e68ead137278ea976e4485c3571ca7f4c2f157 (patch)
tree200e00d6987bfc975b4f3f86c406a5fc65a3a2d4
parent9aacd3da5ba1409250c7cef0f51ee7a5745222e8 (diff)
replace malloc with calloc
-rw-r--r--bf.c6
1 files changed, 1 insertions, 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;
}