summaryrefslogtreecommitdiff
path: root/tools/declare_queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/declare_queue.c')
-rw-r--r--tools/declare_queue.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/declare_queue.c b/tools/declare_queue.c
index 3536455..145a15e 100644
--- a/tools/declare_queue.c
+++ b/tools/declare_queue.c
@@ -88,12 +88,11 @@ int main(int argc, const char **argv)
durable,
0,
0,
- AMQP_EMPTY_TABLE);
- if (reply == NULL) {
+ amqp_empty_table);
+ if (reply == NULL)
die_rpc(amqp_get_rpc_reply(conn), "queue.declare");
- }
- write(1, reply->queue.bytes, reply->queue.len);
- write(1, "\n", strlen("\n"));
+
+ printf("%.*s\n", (int)reply->queue.len, (char *)reply->queue.bytes);
}
close_connection(conn);
return 0;