Module Name:    src
Committed By:   christos
Date:           Thu Jan 12 19:03:09 UTC 2017

Modified Files:
        src/sys/sys: bitops.h

Log Message:
fix sign issues


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 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.11 src/sys/sys/bitops.h:1.12
--- src/sys/sys/bitops.h:1.11	Thu Dec  6 21:27:58 2012
+++ src/sys/sys/bitops.h	Thu Jan 12 14:03:09 2017
@@ -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 @@ fast_divide32_prepare(uint32_t _div, uin
 	_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 */

Reply via email to