summaryrefslogtreecommitdiff
path: root/librabbitmq
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2020-12-24 16:17:55 +0000
committerAlan Antonuk <alan.antonuk@gmail.com>2020-12-24 09:41:41 -0800
commitc9caeaa311f6d8afefc4ecbce44005509a956bed (patch)
tree4396e054f0f34be1e601d846016ebeec89bc2db9 /librabbitmq
parent1ae1b3d2a07b67503538b04f08c9401a00226f22 (diff)
downloadrabbitmq-c-c9caeaa311f6d8afefc4ecbce44005509a956bed.tar.gz
Format sources using clang-format-10
This should allow the check-format step to work on Github Actions.
Diffstat (limited to 'librabbitmq')
-rw-r--r--librabbitmq/amqp.h22
-rw-r--r--librabbitmq/amqp_connection.c6
-rw-r--r--librabbitmq/amqp_framing.h4
-rw-r--r--librabbitmq/amqp_openssl_hostname_validation.h22
-rw-r--r--librabbitmq/amqp_table.c4
-rw-r--r--librabbitmq/amqp_time.h4
-rw-r--r--librabbitmq/amqp_url.c2
7 files changed, 33 insertions, 31 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index 7ef64e4..c4ff82f 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -575,8 +575,8 @@ typedef struct amqp_pool_t_ {
* own block in the large_blocks block list */
amqp_pool_blocklist_t pages; /**< blocks that are the size of pagesize */
- amqp_pool_blocklist_t
- large_blocks; /**< allocations larger than the pagesize */
+ amqp_pool_blocklist_t large_blocks; /**< allocations larger than the pagesize
+ */
int next_page; /**< an index to the next unused page block */
char *alloc_block; /**< pointer to the current allocation block */
@@ -608,8 +608,8 @@ typedef struct amqp_frame_t_ {
*/
amqp_channel_t channel; /**< the channel the frame was received on */
union {
- amqp_method_t
- method; /**< a method, use if frame_type == AMQP_FRAME_METHOD */
+ amqp_method_t method; /**< a method, use if frame_type == AMQP_FRAME_METHOD
+ */
struct {
uint16_t class_id; /**< the class for the properties */
uint64_t body_size; /**< size of the body in bytes */
@@ -2201,16 +2201,16 @@ void AMQP_CALL amqp_destroy_message(amqp_message_t *message);
* \since v0.4.0
*/
typedef struct amqp_envelope_t_ {
- amqp_channel_t channel; /**< channel message was delivered on */
- amqp_bytes_t
- consumer_tag; /**< the consumer tag the message was delivered to */
- uint64_t delivery_tag; /**< the messages delivery tag */
+ amqp_channel_t channel; /**< channel message was delivered on */
+ amqp_bytes_t consumer_tag; /**< the consumer tag the message was delivered to
+ */
+ uint64_t delivery_tag; /**< the messages delivery tag */
amqp_boolean_t redelivered; /**< flag indicating whether this message is being
redelivered */
amqp_bytes_t exchange; /**< exchange this message was published to */
- amqp_bytes_t
- routing_key; /**< the routing key this message was published with */
- amqp_message_t message; /**< the message */
+ amqp_bytes_t routing_key; /**< the routing key this message was published with
+ */
+ amqp_message_t message; /**< the message */
} amqp_envelope_t;
/**
diff --git a/librabbitmq/amqp_connection.c b/librabbitmq/amqp_connection.c
index b106f70..d389be3 100644
--- a/librabbitmq/amqp_connection.c
+++ b/librabbitmq/amqp_connection.c
@@ -281,8 +281,8 @@ int amqp_handle_input(amqp_connection_state_t state, amqp_bytes_t received_data,
return (int)bytes_consumed;
}
- /* it's not a protocol header; fall through to process it as a
- regular frame header */
+ /* it's not a protocol header; fall through to process it as a
+ regular frame header */
case CONNECTION_STATE_HEADER: {
amqp_channel_t channel;
@@ -329,7 +329,7 @@ int amqp_handle_input(amqp_connection_state_t state, amqp_bytes_t received_data,
return (int)bytes_consumed;
}
}
- /* fall through to process body */
+ /* fall through to process body */
case CONNECTION_STATE_BODY: {
amqp_bytes_t encoded;
diff --git a/librabbitmq/amqp_framing.h b/librabbitmq/amqp_framing.h
index fb20acc..ad90433 100644
--- a/librabbitmq/amqp_framing.h
+++ b/librabbitmq/amqp_framing.h
@@ -46,7 +46,7 @@ AMQP_BEGIN_DECLS
#define AMQP_PROTOCOL_VERSION_MINOR 9 /**< AMQP protocol version minor */
#define AMQP_PROTOCOL_VERSION_REVISION \
1 /**< AMQP protocol version revision \
- */
+ */
#define AMQP_PROTOCOL_PORT 5672 /**< Default AMQP Port */
#define AMQP_FRAME_METHOD 1 /**< Constant: FRAME-METHOD */
#define AMQP_FRAME_HEADER 2 /**< Constant: FRAME-HEADER */
@@ -794,7 +794,7 @@ typedef struct amqp_confirm_select_ok_t_ {
/* Class property records. */
#define AMQP_CONNECTION_CLASS \
(0x000A) /**< connection class id @internal 10 \
- */
+ */
/** connection class properties */
typedef struct amqp_connection_properties_t_ {
amqp_flags_t _flags; /**< bit-mask of set fields */
diff --git a/librabbitmq/amqp_openssl_hostname_validation.h b/librabbitmq/amqp_openssl_hostname_validation.h
index 3f353e3..920c5b3 100644
--- a/librabbitmq/amqp_openssl_hostname_validation.h
+++ b/librabbitmq/amqp_openssl_hostname_validation.h
@@ -41,17 +41,17 @@ typedef enum {
} amqp_hostname_validation_result;
/**
-* Validates the server's identity by looking for the expected hostname in the
-* server's certificate. As described in RFC 6125, it first tries to find a match
-* in the Subject Alternative Name extension. If the extension is not present in
-* the certificate, it checks the Common Name instead.
-*
-* Returns AMQP_HVR_MATCH_FOUND if a match was found.
-* Returns AMQP_HVR_MATCH_NOT_FOUND if no matches were found.
-* Returns AMQP_HVR_MALFORMED_CERTIFICATE if any of the hostnames had a NUL
-* character embedded in it.
-* Returns AMQP_HVR_ERROR if there was an error.
-*/
+ * Validates the server's identity by looking for the expected hostname in the
+ * server's certificate. As described in RFC 6125, it first tries to find a
+ * match in the Subject Alternative Name extension. If the extension is not
+ * present in the certificate, it checks the Common Name instead.
+ *
+ * Returns AMQP_HVR_MATCH_FOUND if a match was found.
+ * Returns AMQP_HVR_MATCH_NOT_FOUND if no matches were found.
+ * Returns AMQP_HVR_MALFORMED_CERTIFICATE if any of the hostnames had a NUL
+ * character embedded in it.
+ * Returns AMQP_HVR_ERROR if there was an error.
+ */
amqp_hostname_validation_result amqp_ssl_validate_hostname(
const char *hostname, const X509 *server_cert);
diff --git a/librabbitmq/amqp_table.c b/librabbitmq/amqp_table.c
index 24b087c..4e3ace5 100644
--- a/librabbitmq/amqp_table.c
+++ b/librabbitmq/amqp_table.c
@@ -247,11 +247,11 @@ static int amqp_decode_field_value(amqp_bytes_t encoded, amqp_pool_t *pool,
case AMQP_FIELD_KIND_F32:
TRIVIAL_FIELD_DECODER(32);
- /* and by punning, f32 magically gets the right value...! */
+ /* and by punning, f32 magically gets the right value...! */
case AMQP_FIELD_KIND_F64:
TRIVIAL_FIELD_DECODER(64);
- /* and by punning, f64 magically gets the right value...! */
+ /* and by punning, f64 magically gets the right value...! */
case AMQP_FIELD_KIND_DECIMAL:
if (!amqp_decode_8(encoded, offset, &entry->value.decimal.decimals) ||
diff --git a/librabbitmq/amqp_time.h b/librabbitmq/amqp_time.h
index 0d971a9..669dcbe 100644
--- a/librabbitmq/amqp_time.h
+++ b/librabbitmq/amqp_time.h
@@ -53,7 +53,9 @@
* - UINT64_MAX: means 'at infinity', its mean for polls with an infinite
* timeout
*/
-typedef struct amqp_time_t_ { uint64_t time_point_ns; } amqp_time_t;
+typedef struct amqp_time_t_ {
+ uint64_t time_point_ns;
+} amqp_time_t;
/* Gets a monotonic timestamp. This will return 0 if the underlying call to the
* system fails.
diff --git a/librabbitmq/amqp_url.c b/librabbitmq/amqp_url.c
index b5304e5..4255acb 100644
--- a/librabbitmq/amqp_url.c
+++ b/librabbitmq/amqp_url.c
@@ -213,7 +213,7 @@ int amqp_parse_url(char *url, struct amqp_connection_info *parsed) {
res = AMQP_STATUS_OK;
}
-/* Any other delimiter is bad, and we will return AMQP_STATUS_BAD_AMQP_URL. */
+ /* Any other delimiter is bad, and we will return AMQP_STATUS_BAD_AMQP_URL. */
out:
return res;