Page MenuHomeFreeBSD

random: Avoid magic numbers
ClosedPublic

Authored by cperciva on Wed, Sep 18, 5:14 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 22, 11:02 PM
Unknown Object (File)
Sun, Sep 22, 7:37 AM
Unknown Object (File)
Sat, Sep 21, 8:08 PM
Unknown Object (File)
Wed, Sep 18, 12:58 PM
Unknown Object (File)
Wed, Sep 18, 12:28 PM
Subscribers

Details

Summary

Move RANDOM_FORTUNA_{NPOOLS,DEFPOOLSIZE} from fortuna.c to fortuna.h
and use RANDOM_FORTUNA_DEFPOOLSIZE in random_harvestq.c rather than
having a magic (albeit explained in a comment) number. The NPOOLS
value will be used in a later commit.

Sponsored by: Amazon

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cperciva created this revision.
cem added a subscriber: cem.

LGTM.

This revision is now accepted and ready to land.Wed, Sep 18, 3:34 PM
sys/dev/random/fortuna.c
86–89

Note (for the other change) that pool size is hypothetically tunable.

This revision was automatically updated to reflect the committed changes.