[PATCH:libxtrans 3/4] Remove unnecessary casts on malloc, calloc & free calls

Alan Coopersmith alan.coopersmith at oracle.com
Tue Dec 6 11:15:55 PST 2011


On 12/06/11 02:28, Mark Kettenis wrote:
>> From: Alan Coopersmith<alan.coopersmith at oracle.com>
>> Date: Mon,  5 Dec 2011 20:36:31 -0800
>
> Minor nit; see below.
 >
>> -    if ((p_sunaddr = (struct sockaddr_un *) malloc (
>> +    if ((p_sunaddr = malloc (
>>   	ciptr->peeraddrlen)) == NULL)
>
> This one should fit on a single line now isn't it?

Yes, fixed:

-    if ((p_sunaddr = malloc (
-       ciptr->peeraddrlen)) == NULL)
+    if ((p_sunaddr = malloc (ciptr->peeraddrlen)) == NULL)

Thanks for spotting that.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list