index 8a7621d2b5fb912b02d64c8c9f86456d42dbea08..5f49a9e6fc0848d1ff2975e696d3e87e39ae12b9 100644 (file)
--- a/src/daemon/configfile.c
+++ b/src/daemon/configfile.c
return (NULL);
}
return (NULL);
}
- root = (oconfig_item_t *) malloc (sizeof (oconfig_item_t));
+ root = malloc (sizeof (*root));
if (root == NULL)
{
ERROR ("configfile: malloc failed.");
if (root == NULL)
{
ERROR ("configfile: malloc failed.");
return (NULL);
}
return (NULL);
}
- root = (oconfig_item_t *) malloc (sizeof (oconfig_item_t));
+ root = malloc (sizeof (*root));
if (root == NULL)
{
ERROR ("configfile: malloc failed.");
if (root == NULL)
{
ERROR ("configfile: malloc failed.");
cf_unregister (type);
/* This pointer will be free'd in `cf_unregister' */
cf_unregister (type);
/* This pointer will be free'd in `cf_unregister' */
- if ((cf_cb = (cf_callback_t *) malloc (sizeof (cf_callback_t))) == NULL)
+ if ((cf_cb = malloc (sizeof (*cf_cb))) == NULL)
return;
cf_cb->type = type;
return;
cf_cb->type = type;
@@ -1084,7 +1084,7 @@ int cf_register_complex (const char *type, int (*callback) (oconfig_item_t *))
{
cf_complex_callback_t *new;
{
cf_complex_callback_t *new;
- new = (cf_complex_callback_t *) malloc (sizeof (cf_complex_callback_t));
+ new = malloc (sizeof (*new));
if (new == NULL)
return (-1);
if (new == NULL)
return (-1);