CLEANUP: quic_frame: Remove a useless suffix to STOP_SENDING
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.
diff --git a/include/haproxy/quic_frame-t.h b/include/haproxy/quic_frame-t.h
index 1d5438c..8b07dc3 100644
--- a/include/haproxy/quic_frame-t.h
+++ b/include/haproxy/quic_frame-t.h
@@ -126,7 +126,7 @@
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_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;
diff --git a/include/haproxy/quic_frame.h b/include/haproxy/quic_frame.h
index 917b667..1598e6b 100644
--- a/include/haproxy/quic_frame.h
+++ b/include/haproxy/quic_frame.h
@@ -55,7 +55,7 @@
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;
}
diff --git a/src/quic_frame.c b/src/quic_frame.c
index f938d40..badbe44 100644
--- a/src/quic_frame.c
+++ b/src/quic_frame.c
@@ -264,10 +264,10 @@
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_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.