Symbol: random
games/adventure/io.c
176
ch = (*inptr ^ random()) & 0xFF; /* Decrypt input data */
games/adventure/save.c
539
*s = (*s ^ random()) & 0xFF; /* Lightly decrypt */
games/adventure/save.c
97
code = (16 * (random() % 6)) + nibble;
games/adventure/setup.c
108
printf("0x%02x,", (unsigned int)(c ^ random()) & 0xFF);
games/adventure/setup.c
92
(unsigned int)('\t' ^ random()) & 0xFF);
games/arithmetic/arithmetic.c
190
op = keys[random() % nkeys];
games/arithmetic/arithmetic.c
211
left = right * result + random() % right;
games/arithmetic/arithmetic.c
321
value = random() % (maxval + penalty[op][operand]);
games/atc/update.c
206
if ((random() % sp->newplane_time) == 0)
games/atc/update.c
301
p.plane_type = random() % 2;
games/atc/update.c
304
rnd = random() % num_starts;
games/atc/update.c
317
while ((rnd2 = random() % num_starts) == rnd)
games/backgammon/common_source/back.h
46
#define rnum(r) (random()%r)
games/battlestar/extern.h
48
#define rnd(x) (random() % (x))
games/bs/bs.c
291
return(random() % n);
games/canfield/canfield/canfield.c
538
j = random() % decksize;
games/cgram/cgram.c
261
int c = (int)(random() % i);
games/cribbage/cards.c
68
k = random() % j; /* random 0 <= k < j */
games/cribbage/crib.c
208
i = random() % CARDS; /* random cut */
games/cribbage/crib.c
210
j = random() % CARDS;
games/cribbage/crib.c
373
i = random() % (CARDS - pos);
games/cribbage/crib.c
383
i = random() % (CARDS - pos) + pos;
games/fish/fish.c
422
return((int)random() % n);
games/gomoku/pickmove.c
218
return (random() & 1);
games/hack/hack.mklev.c
69
#define somex() ((random()%(croom->hx-croom->lx+1))+croom->lx)
games/hack/hack.mklev.c
70
#define somey() ((random()%(croom->hy-croom->ly+1))+croom->ly)
games/hack/rnd.c
68
#define RND(x) ((random()>>3) % x)
games/hunt/hunt/otto.c
533
&& num_turns > 4 + (random() %
games/hunt/hunt/otto.c
541
duck(random() % NUMDIRECTIONS);
games/hunt/huntd/driver.c
907
return (random() % range);
games/larn/fortune.c
83
return (flines[random() % NFORTUNES]);
games/larn/global.c
847
return ((random() % x) + 1);
games/larn/global.c
853
return (random() % x);
games/mille/roll.c
49
tot += random() % nsides + 1;
games/monop/roll.c
49
tot += (random() % nsides) + 1;
games/phantasia/phantglobs.c
148
return((double) (random() & 0x7fff) / 32768.0);
games/phantasia/phantglobs.c
150
return((double) random() / 32768.0);
games/quiz/quiz.c
216
next = random() % qsize;
games/quiz/quiz.c
226
if (tflag && random() % 100 > 20) {
games/rain/rain.c
87
xpos[j] = random() % cols + 2;
games/rain/rain.c
88
ypos[j] = random() % lines + 2;
games/rain/rain.c
95
x = random() % cols + 2;
games/rain/rain.c
96
y = random() % lines + 2;
games/random/random.c
147
return (int)((denom * random()) / LONG_MAX);
games/random/random.c
155
selected = (int)(denom * random() / LONG_MAX) == 0;
games/random/random.c
165
selected = (int)(denom * random() / LONG_MAX) == 0;
games/random/randomize_fd.c
205
selected = ((int)denom * random())/(((double)RAND_MAX + 1) / numnode);
games/robots/rnd_pos.c
61
return random() % range;
games/rogue/rogue.h
446
#define rrandom random
games/sail/extern.h
56
#define dieroll() ((random()) % 6 + 1)
games/snake/snake/snake.c
472
p.col = random() % ccnt;
games/snake/snake/snake.c
473
p.line = random() % lcnt;
games/snake/snake/snake.c
630
vp = ((random() >> 6) & 01777) % w;
games/snake/snake/snake.c
844
bonus = ((random() >> 8) & 0377) % 10;
games/trek/ranf.c
42
return (random() % max);
games/trek/ranf.c
49
return random() / (double)RAND_MAX;
games/worm/worm.c
181
return (random() % range);
games/worms/worms.c
309
op->opts[(int)random() % op->nopts];
games/wump/wump.c
190
bat_num += ((random() % (room_num / 2)) + 1);
games/wump/wump.c
191
pit_num += ((random() % (room_num / 2)) + 1);
games/wump/wump.c
291
if (random() % 15 == 1)
games/wump/wump.c
344
if (random() % 6 == 1) {
games/wump/wump.c
357
jump(next_room = (random() % room_num) + 1);
games/wump/wump.c
366
if (random() % 12 < 2) {
games/wump/wump.c
379
next_room = player_loc = (random() % room_num) + 1;
games/wump/wump.c
430
arrow_location = (random() % room_num) + 1;
games/wump/wump.c
434
wumplink = (random() % link_num);
games/wump/wump.c
454
chance = random() % 10;
games/wump/wump.c
490
if (random() % (level == EASY ? 12 : 9) < (lastchance += 2)) {
games/wump/wump.c
494
lastchance = random() % 3;
games/wump/wump.c
524
while (!(delta = random() % room_num));
games/wump/wump.c
536
try_again: wumplink = (random() % room_num) + 1;
games/wump/wump.c
542
if (random() % 2 == 1)
games/wump/wump.c
596
loc = (random() % room_num) + 1;
games/wump/wump.c
607
loc = (random() % room_num) + 1;
games/wump/wump.c
616
wumpus_loc = (random() % room_num) + 1;
games/wump/wump.c
623
player_loc = (random() % room_num) + 1;
games/wump/wump.c
697
wumpus_loc = cave[wumpus_loc].tunnel[random() % link_num];
include/stdlib.h
237
long random(void);
lib/libalias/alias_db.c
625
port_sys = random() & ALIAS_PORT_MASK;
lib/libalias/alias_db.c
683
port_sys = random() & ALIAS_PORT_MASK;
lib/libalias/alias_db.c
804
port_sys = random() & ALIAS_PORT_MASK_EVEN;
lib/libalias/alias_db.c
806
port_sys = random() & ALIAS_PORT_MASK;
lib/libalias/alias_db.c
828
port_sys = random() & ALIAS_PORT_MASK_EVEN;
lib/libalias/alias_db.c
830
port_sys = random() & ALIAS_PORT_MASK;
lib/libc/db/test/hash.tests/driver2.c
83
key.size = 128 + (random()&1023);
lib/libc/db/test/hash.tests/driver2.c
84
content.size = 128 + (random()&1023);
lib/libc/stdlib/random.c
255
random();
lib/libdmsg/msg.c
1216
msg->any.head.salt = (random() << 8) | (ioq->seq & 255);
lib/libdmsg/msg_lnk.c
1306
DMsgRNSS = random();
libexec/dma/dma.c
361
backoff = backoff + backoff / 2 + random() % backoff;
libexec/dma/mail.c
473
(uintmax_t)random(),
sbin/fsirand/fsirand.c
210
sblock->fs_id[1] = random();
sbin/fsirand/fsirand.c
259
inodebuf[n].di_gen = random();
sbin/gpt/create.c
397
(int)random(), (int)random());
sbin/growfs/growfs.c
420
zino[j].di_gen = random();
sbin/hammer/test_dupkey.c
74
int len = random() % 16 + 8;
sbin/hammer/test_dupkey.c
78
name[i] = random() % 26 + 'a';
sbin/iscontrol/login.c
309
op->tgtChapID = (random() >> 24) % 255; // should be random enough ...
sbin/newfs/mkfs.c
1140
ip->di_gen = random();
sbin/newfs/mkfs.c
662
sblock.fs_id[1] = random();
sbin/newfs/mkfs.c
836
zino[j].di_gen = random();
sbin/routed/main.c
788
: (lo + random() % ((hi - lo))));
sbin/routed/main.c
789
tp->tv_usec = random() % 1000000;
stand/lib/stand.h
275
extern u_long random(void);
sys/kern/kern_nrandom.c
471
SYSCTL_PROC(_kern, OID_AUTO, random, CTLFLAG_RD | CTLFLAG_ANYBODY, 0, 0,
sys/kern/subr_fattime.c
275
ts.tv_sec = random();
sys/kern/subr_fattime.c
277
ts.tv_nsec = random() % 1000000000;
sys/kern/subr_unit.c
746
j = random();
sys/net/dummynet/ip_dummynet.c
927
q->random = krandom() & 0xffff;
sys/net/dummynet/ip_dummynet.c
933
if (SCALE_MUL(p_b, SCALE((int64_t)q->count)) > q->random) {
sys/net/dummynet/ip_dummynet.c
937
q->random = krandom() & 0xffff;
sys/net/dummynet/ip_dummynet.h
236
int random; /* random value (scaled) */
sys/net/dummynet3/ip_dummynet3.c
946
q->random = krandom() & 0xffff;
sys/net/dummynet3/ip_dummynet3.c
952
if (SCALE_MUL(p_b, SCALE((int64_t)q->count)) > q->random) {
sys/net/dummynet3/ip_dummynet3.c
956
q->random = krandom() & 0xffff;
sys/net/dummynet3/ip_dummynet3.h
251
int random; /* random value (scaled) */
test/stress/eattls.c
36
random1 = random();
test/stress/eattls.c
37
random2 = random();
test/stress/eattls.c
40
buf += random() % (BIGSIZE - sizeof(struct test));
test/stress/eattls.c
55
if (random() % 1000 > 500)
test/stress/eattls.c
56
usleep(random() % 1000);
test/stress/fsstress/fsstress.c
1403
lr = ((__int64_t)random() << 32) + random();
test/stress/fsstress/fsstress.c
1453
which = (int)(random() % total);
test/stress/fsstress/fsstress.c
1504
li = (int)(random() % (sizeof(lengths) / sizeof(lengths[0])));
test/stress/fsstress/fsstress.c
1505
len = (int)(random() % lengths[li]);
test/stress/fsstress/fsstress.c
1565
good = random() & 1;
test/stress/fsstress/fsstress.c
1620
u = (uid_t)random();
test/stress/fsstress/fsstress.c
1621
nbits = (int)(random() % 32);
test/stress/fsstress/fsstress.c
1651
type = rtpct ? ((random() % 100) > rtpct ? FT_REG : FT_RTF) : FT_REG;
test/stress/fsstress/fsstress.c
1653
extsize = (random() % 10) + 1;
test/stress/fsstress/fsstress.c
1792
lr = ((__int64_t)random() << 32) + random();
test/stress/fsstress/fsstress.c
1796
len = (random() % (getpagesize() * 32)) + 1;
test/stress/fsstress/fsstress.c
1872
lr = ((__int64_t)random() << 32) + random();
test/stress/fsstress/fsstress.c
1876
len = (random() % (getpagesize() * 32)) + 1;
test/stress/fsstress/fsstress.c
1966
lr = ((__int64_t)random() << 32) + random();
test/stress/fsstress/fsstress.c
2061
if (!get_fname(FT_DIRm, random(), NULL, NULL, &fep, &v))
test/stress/fsstress/fsstress.c
2208
lr = ((__int64_t)random() << 32) + random();
test/stress/fsstress/fsstress.c
2211
len = (random() % (getpagesize() * 32)) + 1;
test/stress/fsstress/fsstress.c
2266
if (!get_fname(FT_DIRm, random(), NULL, NULL, &dfep, &v))
test/stress/fsstress/fsstress.c
2339
lr = ((__int64_t)random() << 32) + random();
test/stress/fsstress/fsstress.c
2344
fl.l_len = (off64_t)(random() % (1024 * 1024));
test/stress/fsstress/fsstress.c
2431
len = (int)(random() % PATH_MAX);
test/stress/fsstress/fsstress.c
2483
lr = ((__int64_t)random() << 32) + random();
test/stress/fsstress/fsstress.c
2557
lr = ((__int64_t)random() << 32) + random();
test/stress/fsstress/fsstress.c
2562
fl.l_len = (off64_t)(random() % (1 << 20));
test/stress/fsstress/fsstress.c
2611
lr = ((__int64_t)random() << 32) + random();
test/stress/fsstress/fsstress.c
2615
len = (random() % (getpagesize() * 32)) + 1;
test/stress/fsstress/fsstress.c
420
j = random() % 100;
test/stress/fsstress/fsstress.c
423
(void) random();
test/stress/fsstress/fsstress.c
425
errtag = (random() % (XFS_ERRTAG_MAX-1)) + 1;
test/stress/fsstress/fsstress.c
429
j = random() % 100;
test/stress/fsstress/fsstress.c
432
(void) random();
test/stress/fsstress/fsstress.c
434
errtag += (random() % (XFS_ERRTAG_MAX - errtag));
test/stress/fsstress/fsstress.c
705
namerand = random();
test/stress/fsstress/fsstress.c
707
p = &ops[freq_table[random() % freq_table_size]];
test/stress/fsstress/fsstress.c
711
p->func(opno, random());
test/stress/fsx/fsx.c
1162
original_buf[i] = random() % 256;
test/stress/fsx/fsx.c
816
unsigned long rv = random();
test/stress/fsx/fsx.c
846
dotruncate(random() % maxfilelen);
test/stress/fsx/fsx.c
849
size = random() % (maxoplen+1);
test/stress/fsx/fsx.c
853
offset = random();
test/stress/stress2/testcases/badcode/badcode.c
57
i = random() % BUFS;
test/stress/stress2/testcases/badcode/badcode.c
58
buf[i] = random() & 0xff;
test/stress/t_mlock.c
30
beg = random() & (TESTSIZE - 1) & ~4095L;
test/stress/t_mlock.c
31
len = random() & (TESTSIZE - 1) & ~4095L;
test/stress/t_mlock.c
39
if (random() & 1) {
test/stress/tuxload.c
209
buf[i] = random();
test/stress/webstress/webstress.c
319
int ex1 = random() % count;
test/stress/webstress/webstress.c
320
int ex2 = random() % count;
test/sysperf/randread.c
124
pos = random() ^ ((long)random() << 31);
tools/regression/lib/libm/test-rem.c
148
q = random();
tools/regression/lib/libm/test-rem.c
170
q = random();
tools/regression/lib/libm/test-rem.c
192
q = random();
tools/regression/p1003_1b/yield.c
55
int m = random() & 0x0ffff;
tools/test/malloc/main.c
33
j = random() % NBUCKETS;
tools/test/malloc/main.c
34
k = random() % NSIZE;
usr.bin/btpin/btpin.c
118
*pin++ = '0' + (random() % 10);
usr.sbin/cron/cron/do_command.c
206
sleep(random() % jitter);
usr.sbin/dntpd/client.c
168
usleep(min_sleep_opt * 1000000 + random() % 500000);
usr.sbin/dntpd/ntpreq.c
117
wmsg.xmttime.fractionl = random();
usr.sbin/makefs/ffs.c
1199
dip->di_gen = random();
usr.sbin/makefs/ffs.c
715
dinp->di_gen = random();
usr.sbin/makefs/ffs.c
764
dinp->di_gen = random();
usr.sbin/makefs/ffs/mkfs.c
506
sblock.fs_id[1] = random();
usr.sbin/makefs/ffs/mkfs.c
840
dp1->di_gen = random();
usr.sbin/makefs/ffs/mkfs.c
843
dp2->di_gen = random();
usr.sbin/makefs/ffs/mkfs.c
859
dp1->di_gen = random();
usr.sbin/ppp/chap.c
504
*cp++ = (random() % 10) + '0';
usr.sbin/ppp/chap.c
515
*cp++ = random() % (CHAPCHALLENGELEN-16) + 16;
usr.sbin/ppp/chap.c
517
*cp++ = random() & 0xff;
usr.sbin/ppp/datalink.c
101
result = (random() % DIAL_TIMEOUT) + 1;
usr.sbin/ppp/defs.c
71
srandom((time(NULL)^getpid())+random());
usr.sbin/ppp/iplist.c
206
return iplist_setcurpos(list, random() % list->nItems);
usr.sbin/ppp/ipv6cp.c
187
r1 = (((u_long)random()) % i32_max) + 1;
usr.sbin/ppp/ipv6cp.c
188
r2 = (((u_long)random()) % i32_max) + 1;
usr.sbin/ppp/lcp.c
234
return random();
usr.sbin/ppp/libradius/radlib.c
1073
h->ident = random();
usr.sbin/ppp/libradius/radlib.c
872
r = random();
usr.sbin/ppp/mp.c
1018
*(long *)(mp->cfg.enddisc.address + f) = random();
usr.sbin/rtadvd/rtadvd.c
1017
delay = random() % MAX_RA_DELAY_TIME;
usr.sbin/rtadvd/rtadvd.c
1887
interval += random() % (rai->rai_maxinterval -
usr.sbin/rtsold/rtsold.c
601
interval = random() % (MAX_RTR_SOLICITATION_DELAY * MILLION);