# HG changeset patch # User Matti Hamalainen # Date 1403397240 -10800 # Node ID 0ac59c798773c2a93bcf0dfaa58c744b799c7400 # Parent 61d882a9758b186086c5c125836ea426cea92c92 Use th_malloc0() where appropriate. diff -r 61d882a9758b -r 0ac59c798773 th_config.c --- a/th_config.c Sun Jun 22 02:49:17 2014 +0300 +++ b/th_config.c Sun Jun 22 03:34:00 2014 +0300 @@ -45,7 +45,7 @@ return NULL; /* Allocate new item */ - node = (th_cfgitem_t *) th_calloc(1, sizeof(th_cfgitem_t)); + node = (th_cfgitem_t *) th_malloc0(sizeof(th_cfgitem_t)); if (node == NULL) return NULL; diff -r 61d882a9758b -r 0ac59c798773 th_util.c --- a/th_util.c Sun Jun 22 02:49:17 2014 +0300 +++ b/th_util.c Sun Jun 22 03:34:00 2014 +0300 @@ -216,7 +216,7 @@ */ qlist_t * th_llist_new(void *data) { - qlist_t *res = th_calloc(sizeof(qlist_t), 1); + qlist_t *res = th_malloc0(sizeof(qlist_t)); res->data = data; return res; } @@ -506,7 +506,7 @@ */ qringbuf_t * th_ringbuf_new(const size_t size, void (*mdeallocator)(void *data)) { - qringbuf_t *res = th_calloc(1, sizeof(qringbuf_t)); + qringbuf_t *res = th_malloc0(sizeof(qringbuf_t)); res->data = (char **) th_calloc(size, sizeof(char *)); res->size = size;