PERFORCE change 104028 for review

John Baldwin jhb at freebsd.org
Tue Aug 15 15:30:26 UTC 2006


On Tuesday 15 August 2006 09:59, Roman Divacky wrote:
> http://perforce.freebsd.org/chv.cgi?CH=104028
> 
> Change 104028 by rdivacky at rdivacky_witten on 2006/08/15 13:58:45
> 
> 	MALLOC -> malloc and FREE -> free
> 	
> 	Pointed out by: jhb
> 
> Affected files ...
> 
> .. //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_emul.c#9 
edit
> 
> Differences ...
> 
> 
==== //depot/projects/soc2006/rdivacky_linuxolator/compat/linux/linux_emul.c#9 
(text+ko) ====
> 
> @@ -82,14 +82,14 @@
>  
>  	if (child != 0) {
>  	   	/* non-exec call */
> -   		MALLOC(em, struct linux_emuldata *, sizeof *em, M_LINUX, M_WAITOK | 
M_ZERO);
> +   		em = (struct linux_emuldata *) malloc(sizeof *em, M_LINUX, M_WAITOK |

Note that in C you can drop the cast as C allows for void * objects to 
silently become a different pointer specifically so you don't have to use 
casts with malloc(). :)

-- 
John Baldwin


More information about the p4-projects mailing list