Source-Changes-D archive

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

Re: CVS commit: src/sys/kern


On 5/2/2015 9:42 PM, Alistair Crooks 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.

Having said that, I absolutely loathe the "NULL == addr" style of
writing comparisons - it was introduced when compilers were stupid
enough to think that a mistyped "var = value" could be misinterpreted
as a conditional statement like "var == value".

i've committed a change to resolve this, thanks for raising it.


Home | Main Index | Thread Index | Old Index