Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Compliant Solution (POSIX)

This complian compliant solution replaces the rand() function with the POSIX random() function:

...

Although not specified by POSIX, arc4random() is another possibility for systems that support it. The arc4random(3) manual page [OpenBSD] states:

... provides higher quality of data than those described in rand(3), random(3), and drand48(3).

...