Skip to content

Commit

Permalink
do not return negative value from random(). from shigeru@iij.ad.jp
Browse files Browse the repository at this point in the history
  • Loading branch information
itojun committed Nov 6, 2000
1 parent a001e70 commit c8aeabc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 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.
Expand Down Expand Up @@ -60,6 +60,7 @@ random()
long v;

read(fd, &v, sizeof(v));
v &= ((~0UL) >> 1);
return v;
}

Expand Down

0 comments on commit c8aeabc

Please sign in to comment.