1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Remove some redundant null-pointer checks from code that must have

been written before I wrote a never-failing snew.

[originally from svn r9985]
This commit is contained in:
Simon Tatham 2013-08-04 19:33:46 +00:00
parent 8041377799
commit 4b1fcc8ba2
2 changed files with 0 additions and 8 deletions

View File

@ -89,8 +89,6 @@ static void *dss_newkey(char *data, int len)
struct dss_key *dss;
dss = snew(struct dss_key);
if (!dss)
return NULL;
getstring(&data, &len, &p, &slen);
#ifdef DEBUG_DSS
@ -430,8 +428,6 @@ static void *dss_openssh_createkey(unsigned char **blob, int *len)
struct dss_key *dss;
dss = snew(struct dss_key);
if (!dss)
return NULL;
dss->p = getmp(b, len);
dss->q = getmp(b, len);

View File

@ -558,8 +558,6 @@ static void *rsa2_newkey(char *data, int len)
struct RSAKey *rsa;
rsa = snew(struct RSAKey);
if (!rsa)
return NULL;
getstring(&data, &len, &p, &slen);
if (!p || slen != 7 || memcmp(p, "ssh-rsa", 7)) {
@ -694,8 +692,6 @@ static void *rsa2_openssh_createkey(unsigned char **blob, int *len)
struct RSAKey *rsa;
rsa = snew(struct RSAKey);
if (!rsa)
return NULL;
rsa->comment = NULL;
rsa->modulus = getmp(b, len);