filecount plugin: malloc + memset -> calloc
[collectd.git] / src / teamspeak2.c
index 0e683ce..345f57e 100644 (file)
@@ -28,7 +28,6 @@
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <sys/types.h>
-#include <sys/socket.h>
 #include <netdb.h>
 
 /*
@@ -84,7 +83,7 @@ static int tss2_add_vserver (int vserver_port)
        }
 
        /* Allocate memory */
-       entry = (vserver_list_t *) malloc (sizeof (vserver_list_t));
+       entry = malloc (sizeof (*entry));
        if (entry == NULL)
        {
                ERROR ("teamspeak2 plugin: malloc failed.");