Skip to content

Commit 6d8726c

Browse files
committed
Lib: correct types in ENFORCE_STATE macro.
1 parent 5c7a48d commit 6d8726c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

librabbitmq/amqp_connection.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@
5959
#define AMQP_INITIAL_INBOUND_SOCK_BUFFER_SIZE 131072
6060
#endif
6161

62-
63-
#define ENFORCE_STATE(statevec, statenum) \
64-
{ \
65-
amqp_connection_state_t _check_state = (statevec); \
66-
size_t _wanted_state = (statenum); \
67-
if (_check_state->state != _wanted_state) \
68-
amqp_abort("Programming error: invalid AMQP connection state: expected %d, got %d", \
69-
_wanted_state, \
70-
_check_state->state); \
62+
#define ENFORCE_STATE(statevec, statenum) \
63+
{ \
64+
amqp_connection_state_t _check_state = (statevec); \
65+
amqp_connection_state_enum _wanted_state = (statenum); \
66+
if (_check_state->state != _wanted_state) \
67+
amqp_abort( \
68+
"Programming error: invalid AMQP connection state: expected %d, " \
69+
"got %d", \
70+
_wanted_state, _check_state->state); \
7171
}
7272

7373
amqp_connection_state_t amqp_new_connection(void)

0 commit comments

Comments
 (0)