treewide: cleanup malloc calls
[collectd.git] / src / liboconfig / oconfig.c
index d01c79d..48f0b25 100644 (file)
@@ -106,7 +106,7 @@ oconfig_item_t *oconfig_clone (const oconfig_item_t *ci_orig)
 {
   oconfig_item_t *ci_copy;
 
-  ci_copy = (oconfig_item_t *) malloc (sizeof (*ci_copy));
+  ci_copy = malloc (sizeof (*ci_copy));
   if (ci_copy == NULL)
   {
     fprintf (stderr, "malloc failed.\n");
@@ -193,7 +193,7 @@ oconfig_item_t *oconfig_clone (const oconfig_item_t *ci_orig)
   return (ci_copy);
 } /* oconfig_item_t *oconfig_clone */
 
-void oconfig_free_all (oconfig_item_t *ci)
+static void oconfig_free_all (oconfig_item_t *ci)
 {
   int i;