seedrng: code-golf even smaller
Since we're passing 0 as the timeout, we don't need safe_poll. Remove
cleanup at end of program, since OS does that, which lets us simplify
control flow. Factor repeated function calls into ternary loop.
function old new delta
seedrng_main 1061 1459 +398
seed_from_file_if_exists 468 - -468
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 398/-468) Total: -70 bytes
text data bss dec hex filename
1052781 16515 1816 1071112 105808 busybox_old
1052711 16515 1816 1071042 1057c2 busybox_unstripped
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
1 file changed