diff options
Diffstat (limited to 'libdimension/bvst.c')
-rw-r--r-- | libdimension/bvst.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libdimension/bvst.c b/libdimension/bvst.c index 6e23d6d..958273d 100644 --- a/libdimension/bvst.c +++ b/libdimension/bvst.c @@ -25,22 +25,15 @@ dmnsn_bvst * dmnsn_new_bvst() { - dmnsn_bvst *tree = malloc(sizeof(dmnsn_bvst)); - if (tree) { - tree->root = NULL; - } else { - dmnsn_error(DMNSN_SEVERITY_HIGH, "BVST allocation failed."); - } + dmnsn_bvst *tree = dmnsn_malloc(sizeof(dmnsn_bvst)); + tree->root = NULL; return tree; } static dmnsn_bvst_node * dmnsn_new_bvst_node() { - dmnsn_bvst_node *node = malloc(sizeof(dmnsn_bvst_node)); - if (!node) { - dmnsn_error(DMNSN_SEVERITY_HIGH, "BVST node allocation failed."); - } + dmnsn_bvst_node *node = dmnsn_malloc(sizeof(dmnsn_bvst_node)); return node; } |