Commit 95cdad63 authored by Matt Caswell's avatar Matt Caswell
Browse files

Clean up reset of read/write sequences



Use sizeof instead of an explicit size, and use the functions for the
purpose.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent ec30e856
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -166,8 +166,8 @@ void RECORD_LAYER_clear(RECORD_LAYER *rl)
    SSL3_RECORD_clear(&rl->rrec);
    SSL3_RECORD_clear(&rl->wrec);

    memset(rl->read_sequence, 0, sizeof(rl->read_sequence));
    memset(rl->write_sequence, 0, sizeof(rl->write_sequence));
    RECORD_LAYER_reset_read_sequence(rl);
    RECORD_LAYER_reset_write_sequence(rl);
    
    if (rl->d)
        DTLS_RECORD_LAYER_clear(rl);
@@ -219,12 +219,12 @@ void RECORD_LAYER_dup(RECORD_LAYER *dst, RECORD_LAYER *src)

void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl)
{
    memset(rl->read_sequence, 0, 8);
    memset(rl->read_sequence, 0, sizeof(rl->read_sequence));
}

void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl)
{
    memset(rl->write_sequence, 0, 8);
    memset(rl->write_sequence, 0, sizeof(rl->write_sequence));
}

int RECORD_LAYER_setup_comp_buffer(RECORD_LAYER *rl)