return (NULL);
}
- root = (oconfig_item_t *) malloc (sizeof (oconfig_item_t));
+ root = malloc (sizeof (*root));
if (root == NULL)
{
ERROR ("configfile: malloc failed.");
return (NULL);
}
- root = (oconfig_item_t *) malloc (sizeof (oconfig_item_t));
+ root = malloc (sizeof (*root));
if (root == NULL)
{
ERROR ("configfile: malloc failed.");
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;
{
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);