Source-Changes-HG archive

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

[src/trunk]: src/tests cast to destination type.



details:   https://anonhg.NetBSD.org/src/rev/b6f292899e25
branches:  trunk
changeset: 335565:b6f292899e25
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 14 22:16:04 2015 +0000

description:
cast to destination type.

diffstat:

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

diffs (18 lines):

diff -r 9470ab43bcc7 -r b6f292899e25 tests/h_macros.h
--- a/tests/h_macros.h  Wed Jan 14 20:26:41 2015 +0000
+++ b/tests/h_macros.h  Wed Jan 14 22:16:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_macros.h,v 1.9 2013/05/17 15:42:09 christos Exp $ */
+/* $NetBSD: h_macros.h,v 1.10 2015/01/14 22:16:04 christos Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
        uint16_t randval;
 
        while (len >= sizeof(randval)) {
-               *sb++ = (random() & 0xffff);
+               *sb++ = ((uint16_t)random() & 0xffff);
                len -= sizeof(*sb);
        }
        randval = (uint16_t)random();



Home | Main Index | Thread Index | Old Index