mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-06 14:02:47 -05:00
Make compression functions return void.
The return value wasn't used to indicate failure; it only indicated whether any compression was being done at all or whether the compression method was ssh_comp_none, and we can tell the latter just as well by the fact that its init function returns a null context pointer.
This commit is contained in:
20
ssh2bpp.c
20
ssh2bpp.c
@ -537,19 +537,17 @@ static void ssh2_bpp_format_packet(BinaryPacketProtocol *bpp, PktOut *pkt)
|
||||
pkt->downstream_id, pkt->additional_log_text);
|
||||
}
|
||||
|
||||
/*
|
||||
* Compress packet payload.
|
||||
*/
|
||||
{
|
||||
if (s->out.comp && s->out.comp_ctx) {
|
||||
unsigned char *newpayload;
|
||||
int newlen;
|
||||
if (s->out.comp && s->out.comp->compress(
|
||||
s->out.comp_ctx, pkt->data + 5, pkt->length - 5,
|
||||
&newpayload, &newlen)) {
|
||||
pkt->length = 5;
|
||||
put_data(pkt, newpayload, newlen);
|
||||
sfree(newpayload);
|
||||
}
|
||||
/*
|
||||
* Compress packet payload.
|
||||
*/
|
||||
s->out.comp->compress(s->out.comp_ctx, pkt->data + 5, pkt->length - 5,
|
||||
&newpayload, &newlen);
|
||||
pkt->length = 5;
|
||||
put_data(pkt, newpayload, newlen);
|
||||
sfree(newpayload);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user