Date: Tue, 18 Jan 2011 04:13:46 +0000 (UTC) From: Jeff Roberson <jeff@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r217528 - in projects/ofed/head/sys: amd64/include i386/include Message-ID: <201101180413.p0I4DkwG023790@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jeff Date: Tue Jan 18 04:13:46 2011 New Revision: 217528 URL: http://svn.freebsd.org/changeset/base/217528 Log: - Fix the type of constants shifted by more than 32. Modified: projects/ofed/head/sys/amd64/include/endian.h projects/ofed/head/sys/i386/include/endian.h Modified: projects/ofed/head/sys/amd64/include/endian.h ============================================================================== --- projects/ofed/head/sys/amd64/include/endian.h Tue Jan 18 01:20:15 2011 (r217527) +++ projects/ofed/head/sys/amd64/include/endian.h Tue Jan 18 04:13:46 2011 (r217528) @@ -102,9 +102,9 @@ __byte_swap_long_var(__uint64_t x) (((__uint64_t)x >> 40) & 0xff00) | \ (((__uint64_t)x >> 24) & 0xff0000) | \ (((__uint64_t)x >> 8) & 0xff000000) | \ - (((__uint64_t)x << 8) & (0xfful << 32)) | \ - (((__uint64_t)x << 24) & (0xfful << 40)) | \ - (((__uint64_t)x << 40) & (0xfful << 48)) | \ + (((__uint64_t)x << 8) & (0xffull << 32)) | \ + (((__uint64_t)x << 24) & (0xffull << 40)) | \ + (((__uint64_t)x << 40) & (0xffull << 48)) | \ (((__uint64_t)x << 56)))) #define __bswap64(x) (__builtin_constant_p(x) ? \ Modified: projects/ofed/head/sys/i386/include/endian.h ============================================================================== --- projects/ofed/head/sys/i386/include/endian.h Tue Jan 18 01:20:15 2011 (r217527) +++ projects/ofed/head/sys/i386/include/endian.h Tue Jan 18 04:13:46 2011 (r217528) @@ -92,9 +92,9 @@ __byte_swap_int_var(__uint32_t x) (((__uint64_t)x >> 40) & 0xff00) | \ (((__uint64_t)x >> 24) & 0xff0000) | \ (((__uint64_t)x >> 8) & 0xff000000) | \ - (((__uint64_t)x << 8) & (0xfful << 32)) | \ - (((__uint64_t)x << 24) & (0xfful << 40)) | \ - (((__uint64_t)x << 40) & (0xfful << 48)) | \ + (((__uint64_t)x << 8) & (0xffull << 32)) | \ + (((__uint64_t)x << 24) & (0xffull << 40)) | \ + (((__uint64_t)x << 40) & (0xffull << 48)) | \ (((__uint64_t)x << 56)))) #define __bswap64(x) __byte_swap_64_const(x)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101180413.p0I4DkwG023790>