Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/sys fix sign issues
details: https://anonhg.NetBSD.org/src/rev/19cda55db792
branches: trunk
changeset: 820633:19cda55db792
user: christos <christos%NetBSD.org@localhost>
date: Thu Jan 12 19:03:09 2017 +0000
description:
fix sign issues
diffstat:
sys/sys/bitops.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r d78f3524a389 -r 19cda55db792 sys/sys/bitops.h
--- a/sys/sys/bitops.h Thu Jan 12 19:02:22 2017 +0000
+++ b/sys/sys/bitops.h Thu Jan 12 19:03:09 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bitops.h,v 1.11 2012/12/07 02:27:58 christos Exp $ */
+/* $NetBSD: bitops.h,v 1.12 2017/01/12 19:03:09 christos Exp $ */
/*-
* Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
@@ -271,8 +271,8 @@
_l = fls32(_div - 1);
_mt = (uint64_t)(0x100000000ULL * ((1ULL << _l) - _div));
*_m = (uint32_t)(_mt / _div + 1);
- *_s1 = (_l > 1) ? 1 : _l;
- *_s2 = (_l == 0) ? 0 : _l - 1;
+ *_s1 = (_l > 1) ? 1U : (uint8_t)_l;
+ *_s2 = (_l == 0) ? 0 : (uint8_t)(_l - 1);
}
/* ARGSUSED */
Home |
Main Index |
Thread Index |
Old Index