From owner-svn-src-all@freebsd.org Thu Aug 18 10:26:16 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8DB04BBEAE6; Thu, 18 Aug 2016 10:26:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EBCF1843; Thu, 18 Aug 2016 10:26:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7IAQFT6018562; Thu, 18 Aug 2016 10:26:15 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7IAQFjG018561; Thu, 18 Aug 2016 10:26:15 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201608181026.u7IAQFjG018561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 18 Aug 2016 10:26:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304378 - head/sys/netpfil/ipfw/nat64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 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: Thu, 18 Aug 2016 10:26:16 -0000 Author: bz Date: Thu Aug 18 10:26:15 2016 New Revision: 304378 URL: https://svnweb.freebsd.org/changeset/base/304378 Log: Try to fix gcc compilation errors (which are right). nat64_getlasthdr() returns an int, which can be -1 in case of error, storing the result in an uint8_t and then comparing to < 0 is not helpful. Do what is done in the rest of the code and make proto an int here as well. Modified: head/sys/netpfil/ipfw/nat64/nat64_translate.c Modified: head/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64_translate.c Thu Aug 18 10:25:07 2016 (r304377) +++ head/sys/netpfil/ipfw/nat64/nat64_translate.c Thu Aug 18 10:26:15 2016 (r304378) @@ -1415,8 +1415,7 @@ nat64_do_handle_ip6(struct mbuf *m, uint struct sockaddr *dst; uint16_t *csum; uint32_t mtu; - int plen, hlen; - uint8_t proto; + int plen, hlen, proto; /* * XXX: we expect ipfw_chk() did m_pullup() up to upper level