mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-16 12:03:03 -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
4
ssh.c
4
ssh.c
@ -9228,15 +9228,13 @@ void *new_sock_channel(void *handle, Socket s)
|
|||||||
Ssh ssh = (Ssh) handle;
|
Ssh ssh = (Ssh) handle;
|
||||||
struct ssh_channel *c;
|
struct ssh_channel *c;
|
||||||
c = snew(struct ssh_channel);
|
c = snew(struct ssh_channel);
|
||||||
c->ssh = ssh;
|
|
||||||
|
|
||||||
if (c) {
|
c->ssh = ssh;
|
||||||
ssh2_channel_init(c);
|
ssh2_channel_init(c);
|
||||||
c->halfopen = TRUE;
|
c->halfopen = TRUE;
|
||||||
c->type = CHAN_SOCKDATA_DORMANT;/* identify channel type */
|
c->type = CHAN_SOCKDATA_DORMANT;/* identify channel type */
|
||||||
c->u.pfd.s = s;
|
c->u.pfd.s = s;
|
||||||
add234(ssh->channels, c);
|
add234(ssh->channels, c);
|
||||||
}
|
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user