X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fdns.c;h=f48be00968d856236a95282f5d7f56a192213290;hb=1ebf2f31bd2e080e6f42de640f0a3899a61501c0;hp=00fcff191e0ccf0177ec7bea309eb2964b331228;hpb=ef4a3db895a0aba7107c0f1c6c2ef2a7f128aaf8;p=collectd.git diff --git a/src/dns.c b/src/dns.c index 00fcff19..f48be009 100644 --- a/src/dns.c +++ b/src/dns.c @@ -21,6 +21,7 @@ * Mirko Buffoni **/ +#define _DEFAULT_SOURCE #define _BSD_SOURCE #include "collectd.h" @@ -33,7 +34,6 @@ #include #include -#include /* * Private data types @@ -94,7 +94,7 @@ static counter_list_t *counter_list_create (counter_list_t **list, { counter_list_t *entry; - entry = (counter_list_t *) malloc (sizeof (counter_list_t)); + entry = malloc (sizeof (*entry)); if (entry == NULL) return (NULL);