mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Added initialization paranoia
This commit is contained in:
3
func.c
3
func.c
@@ -1106,6 +1106,9 @@ f_randombit(int count, NUMBER **vals)
|
|||||||
long cnt; /* bits needed or skipped */
|
long cnt; /* bits needed or skipped */
|
||||||
|
|
||||||
/* parse args */
|
/* parse args */
|
||||||
|
ztmp.len = 0; /* paranoia */
|
||||||
|
ztmp.v = NULL;
|
||||||
|
ztmp.sign = 0;
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
zrandom(1, &ztmp);
|
zrandom(1, &ztmp);
|
||||||
ans = ziszero(ztmp) ? qlink(&_qzero_) : qlink(&_qone_);
|
ans = ziszero(ztmp) ? qlink(&_qzero_) : qlink(&_qone_);
|
||||||
|
Reference in New Issue
Block a user