mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-12 18:13:50 -05:00
snew() always returns non-NULL, so checking if its return value is NULL
is pointless. [originally from svn r7758]
This commit is contained in:
parent
4a9feea43d
commit
f8e7894e15
14
ssh.c
14
ssh.c
@ -9228,15 +9228,13 @@ void *new_sock_channel(void *handle, Socket s)
|
||||
Ssh ssh = (Ssh) handle;
|
||||
struct ssh_channel *c;
|
||||
c = snew(struct ssh_channel);
|
||||
c->ssh = ssh;
|
||||
|
||||
if (c) {
|
||||
ssh2_channel_init(c);
|
||||
c->halfopen = TRUE;
|
||||
c->type = CHAN_SOCKDATA_DORMANT;/* identify channel type */
|
||||
c->u.pfd.s = s;
|
||||
add234(ssh->channels, c);
|
||||
}
|
||||
c->ssh = ssh;
|
||||
ssh2_channel_init(c);
|
||||
c->halfopen = TRUE;
|
||||
c->type = CHAN_SOCKDATA_DORMANT;/* identify channel type */
|
||||
c->u.pfd.s = s;
|
||||
add234(ssh->channels, c);
|
||||
return c;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user