From owner-svn-src-all@FreeBSD.ORG Tue Dec 16 15:05:36 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B13F1065672; Tue, 16 Dec 2008 15:05:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB6FE8FC14; Tue, 16 Dec 2008 15:05:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBGF5Zut040528; Tue, 16 Dec 2008 15:05:35 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBGF5ZZu040527; Tue, 16 Dec 2008 15:05:35 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812161505.mBGF5ZZu040527@svn.freebsd.org> From: Robert Watson Date: Tue, 16 Dec 2008 15:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186180 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 15:05:36 -0000 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; }