pike.git/
src/
builtin_functions.c
Branch:
Tag:
Non-build tags
All tags
No tags
2015-11-15
2015-11-15 00:34:36 by Martin Nilsson <nilsson@fastmail.com>
a51d50e10cf5fd838b9086a629a6f3d68c7b915b (
12
lines) (+
5
/-
7
)
[
Show
|
Annotate
]
Branch:
8.1
Moved the range limiting of random numbers into my_rand(64).
826:
while( (e+=sizeof(INT64)) <= len ) {
-
str[0] = my_rand64();
+
str[0] = my_rand64(
0
);
str++; } for(e-=sizeof(INT64);e<len;e++) {
-
ret->str[e] = (char)my_rand();
+
ret->str[e] = (char)my_rand(
0
);
} pop_n_elems(args);
3204:
return; } } else {
-
unsigned int foo; /* Sun CC wants this :( */
-
foo=my_rand();
-
salt[0] = choise[
foo % (size
_
t)
strlen(choise)];
-
foo=my_rand();
-
salt[1] = choise[
foo % (size
_
t)
strlen(choise)];
+
salt[0] = choise[
my_rand
(strlen(choise)
)
];
+
salt[1] = choise[
my_rand
(strlen(choise)
)
];
saltp=salt; if (args > 1) { pop_n_elems(args-1);