From owner-svn-src-projects@FreeBSD.ORG Sat Aug 14 22:35:20 2010 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFB23106567A; Sat, 14 Aug 2010 22:35:20 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF6B18FC08; Sat, 14 Aug 2010 22:35:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7EMZKuS040869; Sat, 14 Aug 2010 22:35:20 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7EMZKv0040867; Sat, 14 Aug 2010 22:35:20 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201008142235.o7EMZKv0040867@svn.freebsd.org> From: Jeff Roberson Date: Sat, 14 Aug 2010 22:35:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211320 - projects/ofed/head/sys/amd64/include X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Aug 2010 22:35:21 -0000 Author: jeff Date: Sat Aug 14 22:35:20 2010 New Revision: 211320 URL: http://svn.freebsd.org/changeset/base/211320 Log: - One more endian bug; cast the results of byte_swap_*_const() to the expected result type. Sometimes wider types are passed in but should not be produced. Modified: projects/ofed/head/sys/amd64/include/endian.h Modified: projects/ofed/head/sys/amd64/include/endian.h ============================================================================== --- projects/ofed/head/sys/amd64/include/endian.h Sat Aug 14 22:28:07 2010 (r211319) +++ projects/ofed/head/sys/amd64/include/endian.h Sat Aug 14 22:35:20 2010 (r211320) @@ -83,7 +83,7 @@ __byte_swap_int_var(__uint32_t x) #ifdef __OPTIMIZE__ #define __byte_swap_int_const(x) \ - ((((x) & 0xff000000) >> 24) | \ + (__uint32_t)((((x) & 0xff000000) >> 24) | \ (((x) & 0x00ff0000) >> 8) | \ (((x) & 0x0000ff00) << 8) | \ (((x) & 0x000000ff) << 24)) @@ -109,7 +109,7 @@ __byte_swap_long_var(__uint64_t x) #ifdef __OPTIMIZE__ #define __byte_swap_long_const(x) \ - ((__uint64_t)(((__uint64_t)x >> 56) | \ + (__uint64_t)((((__uint64_t)x >> 56) | \ (((__uint64_t)x >> 40) & 0xff00) | \ (((__uint64_t)x >> 24) & 0xff0000) | \ (((__uint64_t)x >> 8) & 0xff000000) | \