From 51345a3ded6ecd073921b7e83ec06bbd8988c345 Mon Sep 17 00:00:00 2001 From: David Wragg Date: Thu, 21 Oct 2010 17:49:04 +0100 Subject: Eliminate the AMQP_EMPTY_* macros from amqp.h Hooray, amqp.h is now ISO C90 clean. --- tools/common.c | 2 +- tools/consume.c | 8 ++++---- tools/declare_queue.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'tools') diff --git a/tools/common.c b/tools/common.c index f8b6985..7b0a969 100644 --- a/tools/common.c +++ b/tools/common.c @@ -354,5 +354,5 @@ void process_all_options(int argc, const char **argv, amqp_bytes_t cstring_bytes(const char *str) { - return str ? amqp_cstring_bytes(str) : AMQP_EMPTY_BYTES; + return str ? amqp_cstring_bytes(str) : amqp_empty_bytes; } diff --git a/tools/consume.c b/tools/consume.c index 34037d9..434a6f5 100644 --- a/tools/consume.c +++ b/tools/consume.c @@ -100,7 +100,7 @@ static amqp_bytes_t setup_queue(amqp_connection_state_t conn, /* Declare the queue as auto-delete. */ amqp_queue_declare_ok_t *res = amqp_queue_declare(conn, 1, queue_bytes, 0, 0, 1, 1, - AMQP_EMPTY_TABLE); + amqp_empty_table); if (!res) die_rpc(amqp_get_rpc_reply(conn), "queue.declare"); @@ -119,7 +119,7 @@ static amqp_bytes_t setup_queue(amqp_connection_state_t conn, amqp_bytes_t eb = amqp_cstring_bytes(exchange); if (!amqp_queue_bind(conn, 1, queue_bytes, eb, cstring_bytes(routing_key), - AMQP_EMPTY_TABLE)) + amqp_empty_table)) die_rpc(amqp_get_rpc_reply(conn), "queue.bind"); } @@ -131,8 +131,8 @@ static amqp_bytes_t setup_queue(amqp_connection_state_t conn, static void do_consume(amqp_connection_state_t conn, amqp_bytes_t queue, int no_ack, const char * const *argv) { - if (!amqp_basic_consume(conn, 1, queue, AMQP_EMPTY_BYTES, 0, no_ack, - 0, AMQP_EMPTY_TABLE)) + if (!amqp_basic_consume(conn, 1, queue, amqp_empty_bytes, 0, no_ack, + 0, amqp_empty_table)) die_rpc(amqp_get_rpc_reply(conn), "basic.consume"); for (;;) { diff --git a/tools/declare_queue.c b/tools/declare_queue.c index 3536455..7ef7eb6 100644 --- a/tools/declare_queue.c +++ b/tools/declare_queue.c @@ -88,7 +88,7 @@ int main(int argc, const char **argv) durable, 0, 0, - AMQP_EMPTY_TABLE); + amqp_empty_table); if (reply == NULL) { die_rpc(amqp_get_rpc_reply(conn), "queue.declare"); } -- cgit v1.2.1