as long as we're using arc4random(3) to generate $RANDOM,

let it be an uint32_t, like nbsh(1)
This commit is contained in:
tg
2006-08-18 13:40:16 +00:00
parent 11282be59d
commit b131ca909d
4 changed files with 8 additions and 8 deletions

4
var.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.21 2006/07/11 14:51:01 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.22 2006/08/18 13:40:16 tg Exp $");
/*
* Variables
@ -920,7 +920,7 @@ getspec(struct tbl *vp)
setint(vp, (long) (rand() & 0x7fff));
#if HAVE_ARC4RANDOM
else
setint(vp, (long) (arc4random() & 0x7fff));
setint(vp, arc4random());
#endif
vp->flag |= SPECIAL;
break;