[LTP] [RFC PATCH v3 05/10] ima/ima_boot_aggregate: Increase MAX_EVENT_SIZE to 1MB

Cyril Hrubis chrubis@suse.cz
Fri Apr 20 13:02:49 CEST 2018


Hi!
> +	event.data = (char *) malloc(MAX_EVENT_DATA_SIZE);
                        ^
		Please never cast return value from malloc() in	C.

The malloc returns void* which is compatible with any other pointer type
for assigments. This is only needed when you attempt to use malloc()
in C++, but that is not the case here.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list