openvpn plugin: remove unnecessary cast
[collectd.git] / src / openvpn.c
index 8bccce3..f10b174 100644 (file)
@@ -699,7 +699,7 @@ static int openvpn_config (const char *key, const char *value)
                }
 
                /* create a new vpn element since file, version and name are ok */
-               temp = (vpn_status_t *) malloc (sizeof (vpn_status_t));
+               temp = malloc (sizeof (*temp));
                if (temp == NULL)
                {
                        char errbuf[1024];
@@ -712,7 +712,7 @@ static int openvpn_config (const char *key, const char *value)
                temp->version = status_version;
                temp->name = status_name;
 
-               vpn_list = (vpn_status_t **) realloc (vpn_list, (vpn_num + 1) * sizeof (vpn_status_t *));
+               vpn_list = realloc (vpn_list, (vpn_num + 1) * sizeof (vpn_status_t *));
                if (vpn_list == NULL)
                {
                        char errbuf[1024];