chiark / gitweb /
rsa-recover.c: First stage cleanup: hoist variable declarations.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 22 Dec 2014 20:32:58 +0000 (20:32 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 6 Feb 2015 11:02:07 +0000 (11:02 +0000)
Remove all of the variable declarations from inner blocks and hoist them
to toplevel.  Initialize `mp' variables once, and use their initial
values, rather than writing `MP_NEW' explicitly in the first assignment.

There's no functional change here.

Two small (temporary) warts. Firstly, the handling of `z' and `zz' in
the factoring loop is rather nasty, repeatedly freeing and recreating
`zz'; and secondly `p1' and `q1' are used in two separate places.  To
prevent conflicts here, reset the relevant variables to `MP_NEW' after
freeing them.


No differences found