[Gmp-commit] /var/hg/gmp: (seed_from_tod): Make shift well-defined.
mercurial at gmplib.org
mercurial at gmplib.org
Thu Dec 1 21:58:38 UTC 2016
details: /var/hg/gmp/rev/e121607cb19e
changeset: 17152:e121607cb19e
user: Torbjorn Granlund <tg at gmplib.org>
date: Thu Dec 01 22:58:00 2016 +0100
description:
(seed_from_tod): Make shift well-defined.
diffstat:
tests/misc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r 1422270ad081 -r e121607cb19e tests/misc.c
--- a/tests/misc.c Thu Dec 01 15:53:31 2016 +0100
+++ b/tests/misc.c Thu Dec 01 22:58:00 2016 +0100
@@ -83,7 +83,7 @@
#if HAVE_GETTIMEOFDAY
struct timeval tv;
gettimeofday (&tv, NULL);
- seed = tv.tv_sec ^ (tv.tv_usec << 12);
+ seed = tv.tv_sec ^ ((unsigned long) tv.tv_usec << 12);
seed &= 0xffffffff;
#else
time_t tv;
More information about the gmp-commit
mailing list