Invert the signature logic of in{,6}_selectsrc, make them return the
authorjca <jca@openbsd.org>
Fri, 18 Apr 2014 10:48:29 +0000 (10:48 +0000)
committerjca <jca@openbsd.org>
Fri, 18 Apr 2014 10:48:29 +0000 (10:48 +0000)
commit0039ae5121f443fb1a694aa0cd205482e690200f
tree6d779b7c1d3700405ef8ed9a1630d3e20ca045cb
parentfd16f821d57dbd4d081269643d9ca0427696de69
Invert the signature logic of in{,6}_selectsrc, make them return the
error code and pass the resulting source address back to the caller
through a pointer, as suggested by chrisz.  This gives us more readable
code, and eases the deletion of useless checks in the callers' error path.
Add a bunch of "0 -> NULL" conversions, while here.
ok chrisz@ mpi@
sys/netinet/in_pcb.c
sys/netinet/in_pcb.h
sys/netinet/udp_usrreq.c
sys/netinet6/icmp6.c
sys/netinet6/in6_pcb.c
sys/netinet6/in6_src.c
sys/netinet6/ip6_var.h
sys/netinet6/nd6_nbr.c
sys/netinet6/raw_ip6.c
sys/netinet6/udp6_output.c