svn commit: r186180 - head/sys/netinet

Robert Watson rwatson at FreeBSD.org
Tue Dec 16 15:05:36 UTC 2008


Author: rwatson
Date: Tue Dec 16 15:05:35 2008
New Revision: 186180
URL: http://svn.freebsd.org/changeset/base/186180

Log:
  IPFW's pfil hook/unhook code ignores the return values of pfil_add_hook()
  and pfil_remove_hook(), so cast them to (void).
  
  MFC after:	pretty soon

Modified:
  head/sys/netinet/ip_fw_pfil.c

Modified: head/sys/netinet/ip_fw_pfil.c
==============================================================================
--- head/sys/netinet/ip_fw_pfil.c	Tue Dec 16 13:58:37 2008	(r186179)
+++ head/sys/netinet/ip_fw_pfil.c	Tue Dec 16 15:05:35 2008	(r186180)
@@ -435,8 +435,10 @@ ipfw_hook(void)
 	if (pfh_inet == NULL)
 		return ENOENT;
 
-	pfil_add_hook(ipfw_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet);
-	pfil_add_hook(ipfw_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet);
+	(void)pfil_add_hook(ipfw_check_in, NULL, PFIL_IN | PFIL_WAITOK,
+	    pfh_inet);
+	(void)pfil_add_hook(ipfw_check_out, NULL, PFIL_OUT | PFIL_WAITOK,
+	    pfh_inet);
 
 	return 0;
 }
@@ -450,8 +452,10 @@ ipfw_unhook(void)
 	if (pfh_inet == NULL)
 		return ENOENT;
 
-	pfil_remove_hook(ipfw_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet);
-	pfil_remove_hook(ipfw_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet);
+	(void)pfil_remove_hook(ipfw_check_in, NULL, PFIL_IN | PFIL_WAITOK,
+	    pfh_inet);
+	(void)pfil_remove_hook(ipfw_check_out, NULL, PFIL_OUT | PFIL_WAITOK,
+	    pfh_inet);
 
 	return 0;
 }
@@ -466,8 +470,10 @@ ipfw6_hook(void)
 	if (pfh_inet6 == NULL)
 		return ENOENT;
 
-	pfil_add_hook(ipfw_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet6);
-	pfil_add_hook(ipfw_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet6);
+	(void)pfil_add_hook(ipfw_check_in, NULL, PFIL_IN | PFIL_WAITOK,
+	    pfh_inet6);
+	(void)pfil_add_hook(ipfw_check_out, NULL, PFIL_OUT | PFIL_WAITOK,
+	    pfh_inet6);
 
 	return 0;
 }
@@ -481,8 +487,10 @@ ipfw6_unhook(void)
 	if (pfh_inet6 == NULL)
 		return ENOENT;
 
-	pfil_remove_hook(ipfw_check_in, NULL, PFIL_IN | PFIL_WAITOK, pfh_inet6);
-	pfil_remove_hook(ipfw_check_out, NULL, PFIL_OUT | PFIL_WAITOK, pfh_inet6);
+	(void)pfil_remove_hook(ipfw_check_in, NULL, PFIL_IN | PFIL_WAITOK,
+	    pfh_inet6);
+	(void)pfil_remove_hook(ipfw_check_out, NULL, PFIL_OUT | PFIL_WAITOK,
+	    pfh_inet6);
 
 	return 0;
 }


More information about the svn-src-head mailing list