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)
commitf2d45696fc0060f54eac1b1937fa6bcdf7799af0
treeb3e4a544cc2ea9a820852574f3c7b7450cdd1955
parent395da1081e82c27bbd927b22fd52fc6d63d188b7
rsa-recover.c: First stage cleanup: hoist variable declarations.

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.
pub/rsa-recover.c