From 5607b2759a3148be6f38a9205d225bc8c802eaf1 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 3 Oct 2016 21:12:23 +0100 Subject: [PATCH] Convert SSL3_RECORD_clear() and SSL3_RECORD_release() to size_t Reviewed-by: Rich Salz --- ssl/record/record_locl.h | 4 ++-- ssl/record/ssl3_record.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ssl/record/record_locl.h b/ssl/record/record_locl.h index 0c9df3e6b0..3d5144374e 100644 --- a/ssl/record/record_locl.h +++ b/ssl/record/record_locl.h @@ -100,8 +100,8 @@ int ssl3_release_write_buffer(SSL *s); #define SSL3_RECORD_is_read(r) ((r)->read) #define SSL3_RECORD_set_read(r) ((r)->read = 1) -void SSL3_RECORD_clear(SSL3_RECORD *r, unsigned int num_recs); -void SSL3_RECORD_release(SSL3_RECORD *r, unsigned int num_recs); +void SSL3_RECORD_clear(SSL3_RECORD *r, size_t); +void SSL3_RECORD_release(SSL3_RECORD *r, size_t num_recs); void SSL3_RECORD_set_seq_num(SSL3_RECORD *r, const unsigned char *seq_num); int ssl3_get_record(SSL *s); __owur int ssl3_do_compress(SSL *ssl, SSL3_RECORD *wr); diff --git a/ssl/record/ssl3_record.c b/ssl/record/ssl3_record.c index dc2b479753..921afb017f 100644 --- a/ssl/record/ssl3_record.c +++ b/ssl/record/ssl3_record.c @@ -33,10 +33,10 @@ static const unsigned char ssl3_pad_2[48] = { /* * Clear the contents of an SSL3_RECORD but retain any memory allocated */ -void SSL3_RECORD_clear(SSL3_RECORD *r, unsigned int num_recs) +void SSL3_RECORD_clear(SSL3_RECORD *r, size_t num_recs) { unsigned char *comp; - unsigned int i; + size_t i; for (i = 0; i < num_recs; i++) { comp = r[i].comp; @@ -46,9 +46,9 @@ void SSL3_RECORD_clear(SSL3_RECORD *r, unsigned int num_recs) } } -void SSL3_RECORD_release(SSL3_RECORD *r, unsigned int num_recs) +void SSL3_RECORD_release(SSL3_RECORD *r, size_t num_recs) { - unsigned int i; + size_t i; for (i = 0; i < num_recs; i++) { OPENSSL_free(r[i].comp); -- 2.25.1