Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet6 Use NULL instead of 0 for pointers
details: https://anonhg.NetBSD.org/src/rev/3e083148aea8
branches: trunk
changeset: 338337:3e083148aea8
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue May 19 01:14:40 2015 +0000
description:
Use NULL instead of 0 for pointers
diffstat:
sys/netinet6/in6_pcb.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (81 lines):
diff -r 07d621bce504 -r 3e083148aea8 sys/netinet6/in6_pcb.c
--- a/sys/netinet6/in6_pcb.c Tue May 19 00:09:02 2015 +0000
+++ b/sys/netinet6/in6_pcb.c Tue May 19 01:14:40 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6_pcb.c,v 1.140 2015/05/02 17:18:03 rtr Exp $ */
+/* $NetBSD: in6_pcb.c,v 1.141 2015/05/19 01:14:40 ozaki-r Exp $ */
/* $KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.140 2015/05/02 17:18:03 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.141 2015/05/19 01:14:40 ozaki-r Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -229,7 +229,7 @@
bcopy(&sin6->sin6_addr.s6_addr32[3],
&sin.sin_addr, sizeof(sin.sin_addr));
if (!IN_MULTICAST(sin.sin_addr.s_addr) &&
- ifa_ifwithaddr((struct sockaddr *)&sin) == 0)
+ ifa_ifwithaddr((struct sockaddr *)&sin) == NULL)
return EADDRNOTAVAIL;
}
} else if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr)) {
@@ -238,7 +238,7 @@
struct ifaddr *ia = NULL;
if ((in6p->in6p_flags & IN6P_FAITH) == 0 &&
- (ia = ifa_ifwithaddr((struct sockaddr *)sin6)) == 0)
+ (ia = ifa_ifwithaddr((struct sockaddr *)sin6)) == NULL)
return (EADDRNOTAVAIL);
/*
@@ -504,7 +504,7 @@
sizeof(sin.sin_addr));
sinp = in_selectsrc(&sin, &in6p->in6p_route,
in6p->in6p_socket->so_options, NULL, &error);
- if (sinp == 0) {
+ if (sinp == NULL) {
if (error == 0)
error = EADDRNOTAVAIL;
return (error);
@@ -531,7 +531,7 @@
return(error);
}
- if (in6a == 0) {
+ if (in6a == NULL) {
if (error == 0)
error = EADDRNOTAVAIL;
return (error);
@@ -802,7 +802,7 @@
goto do_notify;
else if (!IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr,
&sa6_dst->sin6_addr) ||
- in6p->in6p_socket == 0 ||
+ in6p->in6p_socket == NULL ||
(lport && in6p->in6p_lport != lport) ||
(!IN6_IS_ADDR_UNSPECIFIED(&sa6_src.sin6_addr) &&
!IN6_ARE_ADDR_EQUAL(&in6p->in6p_laddr,
@@ -931,7 +931,7 @@
{
struct inpcbhead *head;
struct inpcb_hdr *inph;
- struct in6pcb *in6p, *match = 0;
+ struct in6pcb *in6p, *match = NULL;
int matchwild = 3, wildcard;
u_int16_t lport = lport_arg;
@@ -1175,7 +1175,7 @@
if (vp && table->vestige) {
if ((*table->vestige->lookup6)(faddr6, fport_arg,
laddr6, lport_arg, vp))
- return 0;
+ return NULL;
}
return NULL;
Home |
Main Index |
Thread Index |
Old Index