Source-Changes-HG archive

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

[src/trunk]: src/tests cast and mask is overkill.



details:   https://anonhg.NetBSD.org/src/rev/779357871e13
branches:  trunk
changeset: 335570:779357871e13
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jan 14 22:57:27 2015 +0000

description:
cast and mask is overkill.

diffstat:

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

diffs (18 lines):

diff -r f3d1580bd104 -r 779357871e13 tests/h_macros.h
--- a/tests/h_macros.h  Wed Jan 14 22:25:05 2015 +0000
+++ b/tests/h_macros.h  Wed Jan 14 22:57:27 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_macros.h,v 1.10 2015/01/14 22:16:04 christos Exp $ */
+/* $NetBSD: h_macros.h,v 1.11 2015/01/14 22:57:27 christos Exp $ */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -75,7 +75,7 @@
        uint16_t randval;
 
        while (len >= sizeof(randval)) {
-               *sb++ = ((uint16_t)random() & 0xffff);
+               *sb++ = (uint16_t)random();
                len -= sizeof(*sb);
        }
        randval = (uint16_t)random();



Home | Main Index | Thread Index | Old Index