Skip to content
Snippets Groups Projects
Commit f5a033dd authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Annotate risky call to random()

parent 2c166fd0
No related branches found
No related tags found
1 merge request!488Overhaul LZH code
Pipeline #7554 passed
......@@ -688,6 +688,7 @@ long xp_random(int n)
limit = ((1UL<<((sizeof(long)*CHAR_BIT)-1)) / n) * n - 1;
while(1) {
/* coverity[dont_call] */
curr=random();
if(curr <= limit)
return(curr % n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment