summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Eugenio Abadie <abadiejuan@hotmail.com>2017-10-07 23:03:49 -0300
committerAlan Antonuk <alan.antonuk@gmail.com>2017-10-07 19:34:57 -0700
commit9171f787631ec8d296ea7225e018d659f0703b2c (patch)
treeb0a9aae810548a5c64fb956d98df77ebe3865e28
parentadc34b5ec7a1a078c501b87a8c79a4851a3b0a51 (diff)
downloadrabbitmq-c-9171f787631ec8d296ea7225e018d659f0703b2c.tar.gz
Remove unneeded braces
-rw-r--r--examples/amqp_listenq.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/examples/amqp_listenq.c b/examples/amqp_listenq.c
index 37c06bb..b6439f1 100644
--- a/examples/amqp_listenq.c
+++ b/examples/amqp_listenq.c
@@ -84,35 +84,33 @@ int main(int argc, char const *const *argv)
amqp_basic_consume(conn, 1, amqp_cstring_bytes(queuename), amqp_empty_bytes, 0, 0, 0, amqp_empty_table);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Consuming");
- {
- for (;;) {
- amqp_rpc_reply_t res;
- amqp_envelope_t envelope;
+ for (;;) {
+ amqp_rpc_reply_t res;
+ amqp_envelope_t envelope;
- amqp_maybe_release_buffers(conn);
+ amqp_maybe_release_buffers(conn);
- res = amqp_consume_message(conn, &envelope, NULL, 0);
+ res = amqp_consume_message(conn, &envelope, NULL, 0);
- if (AMQP_RESPONSE_NORMAL != res.reply_type) {
- break;
- }
+ if (AMQP_RESPONSE_NORMAL != res.reply_type) {
+ break;
+ }
- printf("Delivery %u, exchange %.*s routingkey %.*s\n",
- (unsigned) envelope.delivery_tag,
- (int) envelope.exchange.len, (char *) envelope.exchange.bytes,
- (int) envelope.routing_key.len, (char *) envelope.routing_key.bytes);
+ printf("Delivery %u, exchange %.*s routingkey %.*s\n",
+ (unsigned) envelope.delivery_tag,
+ (int) envelope.exchange.len, (char *) envelope.exchange.bytes,
+ (int) envelope.routing_key.len, (char *) envelope.routing_key.bytes);
- if (envelope.message.properties._flags & AMQP_BASIC_CONTENT_TYPE_FLAG) {
- printf("Content-type: %.*s\n",
- (int) envelope.message.properties.content_type.len,
- (char *) envelope.message.properties.content_type.bytes);
- }
- printf("----\n");
+ if (envelope.message.properties._flags & AMQP_BASIC_CONTENT_TYPE_FLAG) {
+ printf("Content-type: %.*s\n",
+ (int) envelope.message.properties.content_type.len,
+ (char *) envelope.message.properties.content_type.bytes);
+ }
+ printf("----\n");
- amqp_dump(envelope.message.body.bytes, envelope.message.body.len);
+ amqp_dump(envelope.message.body.bytes, envelope.message.body.len);
- amqp_destroy_envelope(&envelope);
- }
+ amqp_destroy_envelope(&envelope);
}
die_on_amqp_error(amqp_channel_close(conn, 1, AMQP_REPLY_SUCCESS), "Closing channel");