Source-Changes-D archive

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

Re: CVS commit: src/sys/kern



In article <20150503014244.GW1619%nef.pbox.org@localhost>,
Alistair Crooks  <agc%pkgsrc.org@localhost> wrote:
>Hi Tyler,
>
>On Sat, May 02, 2015 at 11:46:05PM +0000, Tyler R. Retzlaff wrote:
>> Module Name:	src
>> Committed By:	rtr
>> Date:		Sat May  2 23:46:04 UTC 2015
>> 
>> Modified Files:
>> 	src/sys/kern: uipc_socket.c
>> 
>> Log Message:
>> compare mbuf * pointer to NULL instead of 0
>
>> @@ -941,7 +941,7 @@ sosend(struct socket *so, struct mbuf *a
>>  					error = ENOTCONN;
>>  					goto release;
>>  				}
>> -			} else if (addr == 0) {
>> +			} else if (NULL == addr) {
>
>I really appreciate what you're doing with the mbuf conversion work. 
>
>Anyway, please don't get me wrong, I really like the movement away
>from mbufs in the networking code, it's good - just don't see the
>point in using this unconventional way of expressing conditionals.

I winced too when I saw that; we should not have to learn to think
backwards because the compilers used to be stupid. 

christos



Home | Main Index | Thread Index | Old Index