In article <20150503014244.gw1...@nef.pbox.org>, Alistair Crooks <a...@pkgsrc.org> 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