Permalink
Browse files

do not return negative value from random(). from shigeru@iij.ad.jp

  • Loading branch information...
1 parent a001e70 commit c8aeabc30d108b904afc27960c86fda2335d7620 itojun committed Nov 6, 2000
Showing with 2 additions and 1 deletion.
  1. +2 −1 kame/kame/racoon/random.c
@@ -1,4 +1,4 @@
-/* $KAME: random.c,v 1.4 2000/10/06 13:11:39 itojun Exp $ */
+/* $KAME: random.c,v 1.5 2000/11/06 08:43:17 itojun Exp $ */
/*
* Copyright (C) 2000 WIDE Project.
@@ -60,6 +60,7 @@ random()
long v;
read(fd, &v, sizeof(v));
+ v &= ((~0UL) >> 1);
return v;
}

0 comments on commit c8aeabc

Please sign in to comment.