X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fdbi.c;h=36e0d1693e67944957310518ecf2b8c2d79995d3;hb=c8d167c5af263b6f56b39275fd5b281bdaf48b02;hp=655581e8bdc74b7b0e45fcbf90d3af8bae0b20a3;hpb=43aca8ed8b22a7a5a14f8c740948d6ce06efbc95;p=collectd.git diff --git a/src/dbi.c b/src/dbi.c index 655581e8..36e0d169 100644 --- a/src/dbi.c +++ b/src/dbi.c @@ -240,7 +240,7 @@ static int cdbi_config_add_database_driver_option (cdbi_database_t *db, /* {{{ * return (-1); } - option = (cdbi_driver_option_t *) realloc (db->driver_options, + option = realloc (db->driver_options, sizeof (*option) * (db->driver_options_num + 1)); if (option == NULL) { @@ -386,7 +386,7 @@ static int cdbi_config_add_database (oconfig_item_t *ci) /* {{{ */ { cdbi_database_t **temp; - temp = (cdbi_database_t **) realloc (databases, + temp = realloc (databases, sizeof (*databases) * (databases_num + 1)); if (temp == NULL) {