From: Ruben Kerkhof Date: Sat, 15 Dec 2018 17:47:13 +0000 (+0100) Subject: liboconfig: fix minor style issues X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=21d673e2612bd4a1b2a2eeea8e025137326fd0c8;p=collectd.git liboconfig: fix minor style issues --- diff --git a/src/liboconfig/oconfig.c b/src/liboconfig/oconfig.c index 0ffda3aa..e05ced87 100644 --- a/src/liboconfig/oconfig.c +++ b/src/liboconfig/oconfig.c @@ -115,8 +115,7 @@ oconfig_item_t *oconfig_clone(const oconfig_item_t *ci_orig) { if (ci_orig->values_num > 0) /* {{{ */ { - ci_copy->values = (oconfig_value_t *)calloc((size_t)ci_orig->values_num, - sizeof(*ci_copy->values)); + ci_copy->values = calloc(ci_orig->values_num, sizeof(*ci_copy->values)); if (ci_copy->values == NULL) { fprintf(stderr, "calloc failed.\n"); free(ci_copy->key); @@ -144,8 +143,8 @@ oconfig_item_t *oconfig_clone(const oconfig_item_t *ci_orig) { if (ci_orig->children_num > 0) /* {{{ */ { - ci_copy->children = (oconfig_item_t *)calloc((size_t)ci_orig->children_num, - sizeof(*ci_copy->children)); + ci_copy->children = + calloc(ci_orig->children_num, sizeof(*ci_copy->children)); if (ci_copy->children == NULL) { fprintf(stderr, "calloc failed.\n"); oconfig_free(ci_copy);