Skip to content
Commit ee1de406 authored by Greg Price's avatar Greg Price Committed by Theodore Ts'o
Browse files

random: simplify accounting logic



This logic is exactly equivalent to the old logic, but it should
be easier to see what it's doing.

The equivalence depends on one fact from outside this function:
when 'r->limit' is false, 'reserved' is zero.  (Well, two facts;
the other is that 'reserved' is never negative.)

Cc: Jiri Kosina <jkosina@suse.cz>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: default avatarGreg Price <price@mit.edu>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 19fa5be1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment