Skip to content

Commit

Permalink
Lib: correct types in ENFORCE_STATE macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanxz committed Apr 10, 2016
1 parent 5c7a48d commit 6d8726c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions librabbitmq/amqp_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@
#define AMQP_INITIAL_INBOUND_SOCK_BUFFER_SIZE 131072
#endif


#define ENFORCE_STATE(statevec, statenum) \
{ \
amqp_connection_state_t _check_state = (statevec); \
size_t _wanted_state = (statenum); \
if (_check_state->state != _wanted_state) \
amqp_abort("Programming error: invalid AMQP connection state: expected %d, got %d", \
_wanted_state, \
_check_state->state); \
#define ENFORCE_STATE(statevec, statenum) \
{ \
amqp_connection_state_t _check_state = (statevec); \
amqp_connection_state_enum _wanted_state = (statenum); \
if (_check_state->state != _wanted_state) \
amqp_abort( \
"Programming error: invalid AMQP connection state: expected %d, " \
"got %d", \
_wanted_state, _check_state->state); \
}

amqp_connection_state_t amqp_new_connection(void)
Expand Down

0 comments on commit 6d8726c

Please sign in to comment.