projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9fa5f66
)
liboconfig: fix minor style issues
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 15 Dec 2018 17:47:13 +0000
(18:47 +0100)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 15 Dec 2018 18:40:14 +0000
(19:40 +0100)
src/liboconfig/oconfig.c
patch
|
blob
|
history
diff --git
a/src/liboconfig/oconfig.c
b/src/liboconfig/oconfig.c
index
0ffda3a
..
e05ced8
100644
(file)
--- 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) /* {{{ */
{
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);
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) /* {{{ */
{
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);
if (ci_copy->children == NULL) {
fprintf(stderr, "calloc failed.\n");
oconfig_free(ci_copy);