3 ms·
I had to check the author ...learned that Thingiverse are Swedish, based in Stockholm even. The article was written Adam Dunkels who is certainly not without c
by unwind 5y ago
I had to check the author ...learned that Thingiverse are Swedish, based in Stockholm even.
The article was written Adam Dunkels who is certainly not without creds in the embedded world. Why whould he show the code to rand_r() in an article about rand()? So confused now.
- AlotOfReading 5y agoYou shouldn't be confused if you read the article. The actual PRNG is implemented in rand_r() and is the first place most people would look. The issue is in the reentrant wrapper in rand().
- unwind 5y agoI seem to be catching downvotes, but I did read the article. The text right before the rand_r() code box reads: This is the code of the rand() function, which looks familiar: That has to count as at least a typo, but I think it's a bigger editing-type problem.