Module Name:    src
Committed By:   riastradh
Date:           Wed Apr 15 13:02:17 UTC 2015

Modified Files:
        src/sys/netinet: ip_encap.c

Log Message:
KASSERT x then y, not x && y, to give more specific errors.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/netinet/ip_encap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/netinet/ip_encap.c
diff -u src/sys/netinet/ip_encap.c:1.42 src/sys/netinet/ip_encap.c:1.43
--- src/sys/netinet/ip_encap.c:1.42	Wed Apr 15 08:47:28 2015
+++ src/sys/netinet/ip_encap.c	Wed Apr 15 13:02:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_encap.c,v 1.42 2015/04/15 08:47:28 ozaki-r Exp $	*/
+/*	$NetBSD: ip_encap.c,v 1.43 2015/04/15 13:02:16 riastradh Exp $	*/
 /*	$KAME: ip_encap.c,v 1.73 2001/10/02 08:30:58 itojun Exp $	*/
 
 /*
@@ -75,7 +75,7 @@
 #define USE_RADIX
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.42 2015/04/15 08:47:28 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.43 2015/04/15 13:02:16 riastradh Exp $");
 
 #include "opt_mrouting.h"
 #include "opt_inet.h"
@@ -505,8 +505,10 @@ encap_attach(int af, int proto,
 		if (ep->func)
 			continue;
 
-		KASSERT(ep->src != NULL && ep->dst != NULL &&
-		    ep->srcmask != NULL && ep->dstmask != NULL);
+		KASSERT(ep->src != NULL);
+		KASSERT(ep->dst != NULL);
+		KASSERT(ep->srcmask != NULL);
+		KASSERT(ep->dstmask != NULL);
 
 		if (ep->src->sa_len != sp->sa_len ||
 		    memcmp(ep->src, sp, sp->sa_len) != 0 ||

Reply via email to