summaryrefslogtreecommitdiff
path: root/examples/amqp_bind.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/amqp_bind.c')
-rw-r--r--examples/amqp_bind.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/amqp_bind.c b/examples/amqp_bind.c
index 7864871..3c9a863 100644
--- a/examples/amqp_bind.c
+++ b/examples/amqp_bind.c
@@ -41,7 +41,8 @@
#include "utils.h"
-int main(int argc, char const * const *argv) {
+int main(int argc, char const *const *argv)
+{
char const *hostname;
int port;
char const *exchange;
@@ -67,15 +68,15 @@ int main(int argc, char const * const *argv) {
die_on_error(sockfd = amqp_open_socket(hostname, port), "Opening socket");
amqp_set_sockfd(conn, sockfd);
die_on_amqp_error(amqp_login(conn, "/", 0, 131072, 0, AMQP_SASL_METHOD_PLAIN, "guest", "guest"),
- "Logging in");
+ "Logging in");
amqp_channel_open(conn, 1);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel");
amqp_queue_bind(conn, 1,
- amqp_cstring_bytes(queue),
- amqp_cstring_bytes(exchange),
- amqp_cstring_bytes(bindingkey),
- amqp_empty_table);
+ amqp_cstring_bytes(queue),
+ amqp_cstring_bytes(exchange),
+ amqp_cstring_bytes(bindingkey),
+ amqp_empty_table);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Unbinding");
die_on_amqp_error(amqp_channel_close(conn, 1, AMQP_REPLY_SUCCESS), "Closing channel");