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:
parent
8041377799
commit
4b1fcc8ba2
4
sshdss.c
4
sshdss.c
@ -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);
|
||||
|
4
sshrsa.c
4
sshrsa.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user