diff --git a/src/protocol/definitions/transport.c b/src/protocol/definitions/transport.c index a332626e6..2b463190b 100644 --- a/src/protocol/definitions/transport.c +++ b/src/protocol/definitions/transport.c @@ -150,13 +150,10 @@ _z_transport_message_t _z_t_msg_make_init_syn(z_whatami_t whatami, _z_id_t zid) } #if Z_FEATURE_FRAGMENTATION == 1 - bool has_patch = msg._body._join._patch != _Z_NO_PATCH; -#else - bool has_patch = false; -#endif - if (has_patch) { + if (msg._body._init._patch != _Z_NO_PATCH) { _Z_SET_FLAG(msg._header, _Z_FLAG_T_Z); } +#endif return msg; }