diff options
Diffstat (limited to 'librabbitmq')
-rw-r--r-- | librabbitmq/amqp.h | 8 | ||||
-rw-r--r-- | librabbitmq/amqp_mem.c | 2 |
2 files changed, 1 insertions, 9 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h index 40c8292..f08990b 100644 --- a/librabbitmq/amqp.h +++ b/librabbitmq/amqp.h @@ -292,14 +292,6 @@ extern amqp_bytes_t amqp_bytes_malloc_dup(amqp_bytes_t src); extern amqp_bytes_t amqp_bytes_malloc(size_t amount); extern void amqp_bytes_free(amqp_bytes_t bytes); -#define AMQP_BYTES_FREE(b) \ - ({ \ - if ((b).bytes != NULL) { \ - free((b).bytes); \ - (b).bytes = NULL; \ - } \ - }) - extern amqp_connection_state_t amqp_new_connection(void); extern int amqp_get_sockfd(amqp_connection_state_t state); extern void amqp_set_sockfd(amqp_connection_state_t state, diff --git a/librabbitmq/amqp_mem.c b/librabbitmq/amqp_mem.c index 021151a..afe45fb 100644 --- a/librabbitmq/amqp_mem.c +++ b/librabbitmq/amqp_mem.c @@ -196,5 +196,5 @@ amqp_bytes_t amqp_bytes_malloc(size_t amount) { } void amqp_bytes_free(amqp_bytes_t bytes) { - AMQP_BYTES_FREE(bytes); + free(bytes.bytes); } |