summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormglocker <mglocker@openbsd.org>2020-08-05 21:15:38 +0000
committermglocker <mglocker@openbsd.org>2020-08-05 21:15:38 +0000
commit4881309f4df807726e153aed75aeb0c7f879f667 (patch)
treef97b75147b34e3fa34da1de23bde519d662385e3
parentUse PFKEYV2_LIFETIME_CURRENT instead of magic number. (diff)
downloadwireguard-openbsd-4881309f4df807726e153aed75aeb0c7f879f667.tar.xz
wireguard-openbsd-4881309f4df807726e153aed75aeb0c7f879f667.zip
Don't compare pointers against zero.
Reported by Peter J. Philipp. ok mvs@ deraadt@
-rw-r--r--sys/netinet/udp_usrreq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 62335421123..0aced03307f 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udp_usrreq.c,v 1.260 2020/08/01 23:41:56 gnezdo Exp $ */
+/* $OpenBSD: udp_usrreq.c,v 1.261 2020/08/05 21:15:38 mglocker Exp $ */
/* $NetBSD: udp_usrreq.c,v 1.28 1996/03/16 23:54:03 christos Exp $ */
/*
@@ -486,7 +486,7 @@ udp_input(struct mbuf **mp, int *offp, int proto, int af)
inp = in_pcbhashlookup(&udbtable, ip->ip_src, uh->uh_sport,
ip->ip_dst, uh->uh_dport, m->m_pkthdr.ph_rtableid);
}
- if (inp == 0) {
+ if (inp == NULL) {
udpstat_inc(udps_pcbhashmiss);
#ifdef INET6
if (ip6) {
@@ -519,7 +519,7 @@ udp_input(struct mbuf **mp, int *offp, int proto, int af)
}
#endif /*IPSEC */
- if (inp == 0) {
+ if (inp == NULL) {
udpstat_inc(udps_noport);
if (m->m_flags & (M_BCAST | M_MCAST)) {
udpstat_inc(udps_noportbcast);