Date: Wed, 2 Aug 2017 14:54:54 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r321930 - head/sys/sys Message-ID: <201708021454.v72EstOB075494@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Wed Aug 2 14:54:54 2017 New Revision: 321930 URL: https://svnweb.freebsd.org/changeset/base/321930 Log: For makedev(), cast the minor argument to unsigned type explicitely, avoiding possible sign propagation. Submitted by: hselasky Modified: head/sys/sys/types.h Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Wed Aug 2 14:45:58 2017 (r321929) +++ head/sys/sys/types.h Wed Aug 2 14:54:54 2017 (r321930) @@ -366,7 +366,7 @@ __bitcount64(__uint64_t _x) #define major(x) ((int)((dev_t)(x) >> 32)) /* major number */ #define minor(x) ((int)((x) & 0xffffffff)) /* minor number */ -#define makedev(x, y) (((dev_t)(x) << 32) | (y)) /* create dev_t */ +#define makedev(x, y) (((dev_t)(x) << 32) | (unsigned)(y)) /* create dev_t */ /* * These declarations belong elsewhere, but are repeated here and in
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708021454.v72EstOB075494>