X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Frrdtool.c;h=6b44f67e48e36757cdd34f4dd8334873fb109aac;hb=d13a04dc3645a21acecc14a4174837766ecb6a2b;hp=fd5fb56334346e406b7a1747b5e41ab2459f7722;hpb=4d6ff066b1c60a8e6654e4c74370ef951f37b5f3;p=collectd.git diff --git a/src/rrdtool.c b/src/rrdtool.c index fd5fb563..6b44f67e 100644 --- a/src/rrdtool.c +++ b/src/rrdtool.c @@ -166,7 +166,7 @@ static int srrd_update (char *filename, char *template, assert (template == NULL); new_argc = 2 + argc; - new_argv = (char **) malloc ((new_argc + 1) * sizeof (char *)); + new_argv = malloc ((new_argc + 1) * sizeof (*new_argv)); if (new_argv == NULL) { ERROR ("rrdtool plugin: malloc failed."); @@ -480,7 +480,7 @@ static int rrd_queue_enqueue (const char *filename, { rrd_queue_t *queue_entry; - queue_entry = (rrd_queue_t *) malloc (sizeof (rrd_queue_t)); + queue_entry = malloc (sizeof (*queue_entry)); if (queue_entry == NULL) return (-1);