From owner-svn-src-head@FreeBSD.ORG Thu Jun 26 17:03:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E56514DF; Thu, 26 Jun 2014 17:03:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 D28862219; Thu, 26 Jun 2014 17:03:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5QH38g2098274; Thu, 26 Jun 2014 17:03:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5QH387o098273; Thu, 26 Jun 2014 17:03:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201406261703.s5QH387o098273@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 26 Jun 2014 17:03:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r267919 - head/sys/dev/netfpga10g/nf10bmac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Jun 2014 17:03:09 -0000 Author: bz Date: Thu Jun 26 17:03:08 2014 New Revision: 267919 URL: http://svnweb.freebsd.org/changeset/base/267919 Log: Rather than using a constant use sizeof(val) allowing for the length to automatically change as we switch between 32/64bit. MFC after: 2 weeks Modified: head/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c Modified: head/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c ============================================================================== --- head/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c Thu Jun 26 16:49:45 2014 (r267918) +++ head/sys/dev/netfpga10g/nf10bmac/if_nf10bmac.c Thu Jun 26 17:03:08 2014 (r267919) @@ -229,7 +229,7 @@ nf10bmac_tx_locked(struct nf10bmac_softc int sl; if (l == (ml - 1)) - len = 4; + len = sizeof(val); cl = len; for (s = 0, sl = len; sl > 0; sl--)