* FIX [bridge] fix uninitailized reason code.
@@ -58,7 +58,7 @@ sub_callback(void *arg)
static void
disconnect_cb(nng_pipe p, nng_pipe_ev ev, void *arg)
{
- int reason;
+ int reason = 0;
// get connect reason
nng_pipe_get_int(p, NNG_OPT_MQTT_DISCONNECT_REASON, &reason);
// property *prop;
@@ -72,7 +72,7 @@ bridge_connect_cb(nng_pipe p, nng_pipe_ev ev, void *arg)
{
// Connected succeed
bridge_param *param = arg;
- int reason;
+ int reason = 0;
// get connect reason
nng_pipe_get_int(p, NNG_OPT_MQTT_CONNECT_REASON, &reason);
// get property for MQTT V5
