X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fthreshold.c;h=624ab7a91dd7c14b7112e9c2884bff46c636f8d1;hb=d41585ea72b7e2768c4dd507016ffd0cc3a6e130;hp=ed8312992b437c9984d6885309bc972f1450fb4d;hpb=ccc4feb9576f520596508418f404beb000fde1aa;p=collectd.git diff --git a/src/threshold.c b/src/threshold.c index ed831299..624ab7a9 100644 --- a/src/threshold.c +++ b/src/threshold.c @@ -70,7 +70,7 @@ static int ut_threshold_add (const threshold_t *th) return (-1); } - th_copy = (threshold_t *) malloc (sizeof (threshold_t)); + th_copy = malloc (sizeof (*th_copy)); if (th_copy == NULL) { sfree (name_copy);