Module Name: src
Committed By: mrg
Date: Thu Mar 8 10:06:18 UTC 2018
Modified Files:
src/sys/sys: bitops.h
Log Message:
use 1ul for a left shift that may be greater than int sized.
noticed by martin.
fixes PR#53081.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/sys/bitops.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/bitops.h
diff -u src/sys/sys/bitops.h:1.12 src/sys/sys/bitops.h:1.13
--- src/sys/sys/bitops.h:1.12 Thu Jan 12 19:03:09 2017
+++ src/sys/sys/bitops.h Thu Mar 8 10:06:18 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: bitops.h,v 1.12 2017/01/12 19:03:09 christos Exp $ */
+/* $NetBSD: bitops.h,v 1.13 2018/03/08 10:06:18 mrg Exp $ */
/*-
* Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -304,7 +304,7 @@ fast_remainder32(uint32_t _v, uint32_t _
#define __BITMAP_SIZE(__t, __n) \
(((__n) + (__BITMAP_BITS(__t) - 1)) / __BITMAP_BITS(__t))
#define __BITMAP_BIT(__n, __v) \
- (1 << ((__n) & __BITMAP_MASK(*(__v)->_b)))
+ (1ul << ((__n) & __BITMAP_MASK(*(__v)->_b)))
#define __BITMAP_WORD(__n, __v) \
((__n) >> __BITMAP_SHIFT(*(__v)->_b))