Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/lib/libc/gen

Module Name:    src
Committed By:   dsl
Date:           Mon Aug 20 20:27:47 UTC 2012

Modified Files:
        src/lib/libc/gen: arc4random.c

Log Message:
Since 'rs' is statically initialised (not bss) its s[] might as well be
  compile-time initialised as well.
arc4_init) is the same as arc4_stir().
Initialise rs.i to 0xff (not 0) so that the first key byte is processed
  with rs.i == 0 without the splurios rs.i-- in arc4_addrandom().
Remove the assignment rs.j = rs.i at the end of arc4_addrandom(), it isn't
  necessary and I can see no justificationm for it.
Replace RSIZE with __arraycount(as->s), however it is manifestly 256 (more
  correctly the number of values in rs.i and rs.j).

To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/lib/libc/gen/arc4random.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Home | Main Index | Thread Index | Old Index