]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: quic_frame: Remove a useless suffix to STOP_SENDING
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 10 Dec 2021 13:42:02 +0000 (14:42 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 17 Dec 2021 07:38:43 +0000 (08:38 +0100)
This is to be consistent with the other frame names. Adding a _frame
suffixe to STOP_SENDING is useless. We know this is a frame.

include/haproxy/quic_frame-t.h
include/haproxy/quic_frame.h
src/quic_frame.c

index 1d5438c60a95d9e975fa2b1e2e683769bace54a3..8b07dc3dcc464586fa337ab2672c3ac80fa296bd 100644 (file)
@@ -126,7 +126,7 @@ struct quic_reset_stream {
        uint64_t final_size;
 };
 
-struct quic_stop_sending_frame {
+struct quic_stop_sending {
        uint64_t id;
        uint64_t app_error_code;
 };
@@ -224,7 +224,7 @@ struct quic_frame {
                struct quic_tx_ack tx_ack;
                struct quic_crypto crypto;
                struct quic_reset_stream reset_stream;
-               struct quic_stop_sending_frame stop_sending_frame;
+               struct quic_stop_sending stop_sending;
                struct quic_new_token new_token;
                struct quic_stream stream;
                struct quic_max_data max_data;
index 917b6675ed87962e0e05af92a25f59b335340e7e..1598e6b0dd8dab694b7f5b47ded050da8fc17a09 100644 (file)
@@ -55,7 +55,7 @@ static inline size_t qc_frm_len(struct quic_frame *frm)
                break;
        }
        case QUIC_FT_STOP_SENDING: {
-               struct quic_stop_sending_frame *f = &frm->stop_sending_frame;
+               struct quic_stop_sending *f = &frm->stop_sending;
                len += 1 + quic_int_getsize(f->id) + quic_int_getsize(f->app_error_code);
                break;
        }
index f938d40be9f2255a1d1910f89daff8e17010f5fa..badbe447010e00b0cc668277f4059a1cf83792e3 100644 (file)
@@ -264,10 +264,10 @@ static int quic_parse_reset_stream_frame(struct quic_frame *frm, struct quic_con
 static int quic_build_stop_sending_frame(unsigned char **buf, const unsigned char *end,
                                          struct quic_frame *frm, struct quic_conn *conn)
 {
-       struct quic_stop_sending_frame *stop_sending_frame = &frm->stop_sending_frame;
+       struct quic_stop_sending *stop_sending = &frm->stop_sending;
 
-       return quic_enc_int(buf, end, stop_sending_frame->id) &&
-               quic_enc_int(buf, end, stop_sending_frame->app_error_code);
+       return quic_enc_int(buf, end, stop_sending->id) &&
+               quic_enc_int(buf, end, stop_sending->app_error_code);
 }
 
 /* Parse a STOP_SENDING frame from <buf> buffer with <end> as end into <frm> frame.
@@ -276,10 +276,10 @@ static int quic_build_stop_sending_frame(unsigned char **buf, const unsigned cha
 static int quic_parse_stop_sending_frame(struct quic_frame *frm, struct quic_conn *qc,
                                          const unsigned char **buf, const unsigned char *end)
 {
-       struct quic_stop_sending_frame *stop_sending_frame = &frm->stop_sending_frame;
+       struct quic_stop_sending *stop_sending = &frm->stop_sending;
 
-       return quic_dec_int(&stop_sending_frame->id, buf, end) &&
-               quic_dec_int(&stop_sending_frame->app_error_code, buf, end);
+       return quic_dec_int(&stop_sending->id, buf, end) &&
+               quic_dec_int(&stop_sending->app_error_code, buf, end);
 }
 
 /* Encode a CRYPTO frame into <buf> buffer.