Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys cast align result to int, since the flags argument i...



details:   https://anonhg.NetBSD.org/src/rev/b081fedfd5c6
branches:  trunk
changeset: 833693:b081fedfd5c6
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jul 09 00:46:19 2018 +0000

description:
cast align result to int, since the flags argument is expected to be an int.
>From Kamil

diffstat:

 sys/sys/mman.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 76fa1ca3d063 -r b081fedfd5c6 sys/sys/mman.h
--- a/sys/sys/mman.h    Sun Jul 08 21:59:12 2018 +0000
+++ b/sys/sys/mman.h    Mon Jul 09 00:46:19 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mman.h,v 1.54 2018/07/04 01:17:32 kamil Exp $  */
+/*     $NetBSD: mman.h,v 1.55 2018/07/09 00:46:19 christos Exp $       */
 
 /*-
  * Copyright (c) 1982, 1986, 1993
@@ -106,7 +106,7 @@
  * Alignment (expressed in log2).  Must be >= log2(PAGE_SIZE) and
  * < # bits in a pointer (32 or 64).
  */
-#define        MAP_ALIGNED(n)          ((unsigned int)(n) << MAP_ALIGNMENT_SHIFT)
+#define        MAP_ALIGNED(n)  ((int)((unsigned int)(n) << MAP_ALIGNMENT_SHIFT))
 #define        MAP_ALIGNMENT_SHIFT     24
 #define        MAP_ALIGNMENT_MASK      MAP_ALIGNED(0xff)
 #define        MAP_ALIGNMENT_64KB      MAP_ALIGNED(16) /* 2^16 */



Home | Main Index | Thread Index | Old Index