On Sun, May 25, 2014 at 12:03 PM, Benjamin Baier <[email protected]>wrote:
> This shortens the function quite a bit. > ... > - STORE_OBJECT *object = malloc(sizeof(STORE_OBJECT)); > - if (object) memset(object, 0, sizeof(STORE_OBJECT)); > - return object; > + return (STORE_OBJECT *) calloc(1, sizeof(STORE_OBJECT)); > } > Just say no to casting the return value of malloc/calloc/realloc! Philip Guenther
