From 7f0b1c7016c603139c5ebdb1dd383ae7db217bed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Mon, 24 Apr 2023 14:38:33 +0200 Subject: [PATCH] CLEANUP: quic: Rename variable into quic_padding_check() Make quic_padding_check() be more readable: there is not struct buffer variable used by this function. Should be backported to 2.7. --- src/quic_conn.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/quic_conn.c b/src/quic_conn.c index 399f22f..6f08275 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -6749,18 +6749,18 @@ static int qc_conn_alloc_ssl_ctx(struct quic_conn *qc) goto leave; } -/* Check that all the bytes between included and address +/* Check that all the bytes between included and address * excluded are null. This is the responsibility of the caller to - * check that there is at least one byte between end . + * check that there is at least one byte between end . * Return 1 if this all the bytes are null, 0 if not. */ -static inline int quic_padding_check(const unsigned char *buf, +static inline int quic_padding_check(const unsigned char *pos, const unsigned char *end) { - while (buf < end && !*buf) - buf++; + while (pos < end && !*pos) + pos++; - return buf == end; + return pos == end; } /* Find the associated connection to the packet or create a new one if -- 1.7.10.4