Date: Thu, 12 Sep 2019 15:57:50 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352250 - head/sys/sys Message-ID: <201909121557.x8CFvokG011657@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Thu Sep 12 15:57:49 2019 New Revision: 352250 URL: https://svnweb.freebsd.org/changeset/base/352250 Log: Fix for undefined behaviour. Left shift of 1 by 31 places cannot be represented in type 'int'. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/sys/refcount.h Modified: head/sys/sys/refcount.h ============================================================================== --- head/sys/sys/refcount.h Thu Sep 12 15:50:14 2019 (r352249) +++ head/sys/sys/refcount.h Thu Sep 12 15:57:49 2019 (r352250) @@ -39,7 +39,7 @@ #define KASSERT(exp, msg) /* */ #endif -#define REFCOUNT_WAITER (1 << 31) /* Refcount has waiter. */ +#define REFCOUNT_WAITER (1U << 31) /* Refcount has waiter. */ #define REFCOUNT_SATURATION_VALUE (3U << 29) #define REFCOUNT_SATURATED(val) (((val) & (1U << 30)) != 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909121557.x8CFvokG011657>