From: Frédéric Lécaille Date: Mon, 24 Apr 2023 12:38:33 +0000 (+0200) Subject: CLEANUP: quic: Rename variable into quic_padding_check() X-Git-Tag: v2.8-dev9~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7f0b1c7016c603139c5ebdb1dd383ae7db217bed;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/quic_conn.c b/src/quic_conn.c index 399f22f349..6f0827525d 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