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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux Kernel Hardening]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux