mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Remove a lot of pointless 'struct' keywords.
This is the commit that f3295e0fb
_should_ have been. Yesterday I just
added some typedefs so that I didn't have to wear out my fingers
typing 'struct' in new code, but what I ought to have done is to move
all the typedefs into defs.h with the rest, and then go through
cleaning up the legacy 'struct's all through the existing code.
But I was mostly trying to concentrate on getting the test suite
finished, so I just did the minimum. Now it's time to come back and do
it better.
This commit is contained in:
16
cmdgen.c
16
cmdgen.c
@ -220,8 +220,8 @@ int main(int argc, char **argv)
|
||||
bool errs = false, nogo = false;
|
||||
int intype = SSH_KEYTYPE_UNOPENABLE;
|
||||
int sshver = 0;
|
||||
struct ssh2_userkey *ssh2key = NULL;
|
||||
struct RSAKey *ssh1key = NULL;
|
||||
ssh2_userkey *ssh2key = NULL;
|
||||
RSAKey *ssh1key = NULL;
|
||||
strbuf *ssh2blob = NULL;
|
||||
char *ssh2alg = NULL;
|
||||
char *old_passphrase = NULL, *new_passphrase = NULL;
|
||||
@ -696,29 +696,29 @@ int main(int argc, char **argv)
|
||||
if (keytype == DSA) {
|
||||
struct dss_key *dsskey = snew(struct dss_key);
|
||||
dsa_generate(dsskey, bits, progressfn, &prog);
|
||||
ssh2key = snew(struct ssh2_userkey);
|
||||
ssh2key = snew(ssh2_userkey);
|
||||
ssh2key->key = &dsskey->sshk;
|
||||
ssh1key = NULL;
|
||||
} else if (keytype == ECDSA) {
|
||||
struct ecdsa_key *ek = snew(struct ecdsa_key);
|
||||
ecdsa_generate(ek, bits, progressfn, &prog);
|
||||
ssh2key = snew(struct ssh2_userkey);
|
||||
ssh2key = snew(ssh2_userkey);
|
||||
ssh2key->key = &ek->sshk;
|
||||
ssh1key = NULL;
|
||||
} else if (keytype == ED25519) {
|
||||
struct eddsa_key *ek = snew(struct eddsa_key);
|
||||
eddsa_generate(ek, bits, progressfn, &prog);
|
||||
ssh2key = snew(struct ssh2_userkey);
|
||||
ssh2key = snew(ssh2_userkey);
|
||||
ssh2key->key = &ek->sshk;
|
||||
ssh1key = NULL;
|
||||
} else {
|
||||
struct RSAKey *rsakey = snew(struct RSAKey);
|
||||
RSAKey *rsakey = snew(RSAKey);
|
||||
rsa_generate(rsakey, bits, progressfn, &prog);
|
||||
rsakey->comment = NULL;
|
||||
if (keytype == RSA1) {
|
||||
ssh1key = rsakey;
|
||||
} else {
|
||||
ssh2key = snew(struct ssh2_userkey);
|
||||
ssh2key = snew(ssh2_userkey);
|
||||
ssh2key->key = &rsakey->sshk;
|
||||
}
|
||||
}
|
||||
@ -775,7 +775,7 @@ int main(int argc, char **argv)
|
||||
|
||||
case SSH_KEYTYPE_SSH1:
|
||||
case SSH_KEYTYPE_SSH1_PUBLIC:
|
||||
ssh1key = snew(struct RSAKey);
|
||||
ssh1key = snew(RSAKey);
|
||||
if (!load_encrypted) {
|
||||
strbuf *blob;
|
||||
BinarySource src[1];
|
||||
|
Reference in New Issue
Block a user