From 48e8b24bcc38f644a991944f874108dfb5d6536e Mon Sep 17 00:00:00 2001 From: Kazuho Oku Date: Sat, 9 Mar 2024 22:17:49 +0900 Subject: [PATCH] clang-format --- include/quicly.h | 8 ++++---- lib/quicly.c | 2 +- src/cli.c | 8 ++++---- t/udpfw.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/quicly.h b/include/quicly.h index 6e54bc2a0..3a75e5cc6 100644 --- a/include/quicly.h +++ b/include/quicly.h @@ -59,7 +59,7 @@ extern "C" { #define QUICLY_PACKET_TYPE_RETRY (QUICLY_LONG_HEADER_BIT | QUICLY_QUIC_BIT | 0x30) #define QUICLY_PACKET_TYPE_BITMASK 0xf0 -#define QUICLY_PACKET_IS_LONG_HEADER(first_byte) (((first_byte)&QUICLY_LONG_HEADER_BIT) != 0) +#define QUICLY_PACKET_IS_LONG_HEADER(first_byte) (((first_byte) & QUICLY_LONG_HEADER_BIT) != 0) /** * Version 1. @@ -74,7 +74,7 @@ extern "C" { */ #define QUICLY_PROTOCOL_VERSION_DRAFT27 0xff00001b -#define QUICLY_PACKET_IS_INITIAL(first_byte) (((first_byte)&0xf0) == 0xc0) +#define QUICLY_PACKET_IS_INITIAL(first_byte) (((first_byte) & 0xf0) == 0xc0) #define QUICLY_STATELESS_RESET_PACKET_MIN_LEN 39 @@ -1113,8 +1113,8 @@ int quicly_decode_transport_parameter_list(quicly_transport_parameters_t *params */ int quicly_connect(quicly_conn_t **conn, quicly_context_t *ctx, const char *server_name, struct sockaddr *dest_addr, struct sockaddr *src_addr, const quicly_cid_plaintext_t *new_cid, ptls_iovec_t address_token, - ptls_handshake_properties_t *handshake_properties, - const quicly_transport_parameters_t *resumed_transport_params, void *appdata); + ptls_handshake_properties_t *handshake_properties, const quicly_transport_parameters_t *resumed_transport_params, + void *appdata); /** * accepts a new connection * @param new_cid The CID to be used for the connection. When an error is being returned, the application can reuse the CID diff --git a/lib/quicly.c b/lib/quicly.c index 55e67a3c7..60fec6599 100644 --- a/lib/quicly.c +++ b/lib/quicly.c @@ -2524,7 +2524,7 @@ static int aead_decrypt_1rtt(void *ctx, uint64_t pn, quicly_decoded_packet_t *pa /* prepare key, when not available (yet) */ if (space->cipher.ingress.aead[aead_index] == NULL) { - Retry_1RTT : { + Retry_1RTT: { /* Replace the AEAD key at the alternative slot (note: decryption key slots are shared by 0-RTT and 1-RTT), at the same time * dropping 0-RTT header protection key. */ if (conn->application->cipher.ingress.header_protection.zero_rtt != NULL) { diff --git a/src/cli.c b/src/cli.c index 52f7d644a..bb1713a39 100644 --- a/src/cli.c +++ b/src/cli.c @@ -111,7 +111,7 @@ static struct { struct { const char *path; int to_file; -} * reqs; +} *reqs; struct st_stream_data_t { quicly_streambuf_t streambuf; @@ -452,11 +452,11 @@ static ssize_t receive_datagram(int fd, void *buf, quicly_address_t *src, uint8_ #ifdef IP_RECVTOS if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == #ifdef __APPLE__ - IP_RECVTOS + IP_RECVTOS #else - IP_TOS + IP_TOS #endif - ) { + ) { assert((char *)CMSG_DATA(cmsg) - (char *)cmsg + 1 == cmsg->cmsg_len); *ecn = *(uint8_t *)CMSG_DATA(cmsg) & IPTOS_ECN_MASK; } diff --git a/t/udpfw.c b/t/udpfw.c index 279e1d9d8..958d69fc1 100644 --- a/t/udpfw.c +++ b/t/udpfw.c @@ -59,7 +59,7 @@ struct queue_t { uint8_t data[2048]; size_t len; int64_t arrival; - } * elements; + } *elements; } ring; int64_t delay_usec; /* propagation delay */ int64_t interval_usec; /* serialization delay */