r3020 - trunk/varnish-cache/lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Fri Jul 25 00:20:10 CEST 2008


Author: phk
Date: 2008-07-25 00:20:10 +0200 (Fri, 25 Jul 2008)
New Revision: 3020

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_acl.c
Log:
Relax an assert to only check what we really care about, and not the
principle of the situation.



Modified: trunk/varnish-cache/lib/libvcl/vcc_acl.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_acl.c	2008-07-24 22:12:41 UTC (rev 3019)
+++ trunk/varnish-cache/lib/libvcl/vcc_acl.c	2008-07-24 22:20:10 UTC (rev 3020)
@@ -203,8 +203,8 @@
 	for(res = res0; res != NULL; res = res->ai_next) {
 		switch(res->ai_family) {
 		case PF_INET:
+			assert(PF_INET < 256);
 			sin4 = (void*)res->ai_addr;
-			assert(sizeof(sin4->sin_family) == 1);
 			assert(sizeof(sin4->sin_addr) == 4);
 			u = (void*)&sin4->sin_addr;
 			if (ae->t_mask == NULL)
@@ -213,8 +213,8 @@
 			vcc_acl_emit_entry(tl, ae, 4, u, res->ai_family);
 			break;
 		case PF_INET6:
+			assert(PF_INET6 < 256);
 			sin6 = (void*)res->ai_addr;
-			assert(sizeof(sin6->sin6_family) == 1);
 			assert(sizeof(sin6->sin6_addr) == 16);
 			u = (void*)&sin6->sin6_addr;
 			if (ae->t_mask == NULL)




More information about the varnish-commit mailing list