summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/compat/ndis/subr_ntoskrnl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/compat/ndis/subr_ntoskrnl.c b/sys/compat/ndis/subr_ntoskrnl.c
index 35f38a4..9b5e403 100644
--- a/sys/compat/ndis/subr_ntoskrnl.c
+++ b/sys/compat/ndis/subr_ntoskrnl.c
@@ -3189,13 +3189,15 @@ static int
rand(void)
{
- return (random() / 2 + 1);
+ return (random());
}
static void
srand(unsigned int seed)
{
+ if (seed == 0)
+ seed = 1;
srandom(seed);
}
OpenPOWER on IntegriCloud