From d15c6bd7ef3281ba923fc42624eff37ae56520c5 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Wed, 7 Dec 2022 15:26:13 +0000 Subject: [PATCH] Fix unitialised value and incorrect loop. --- lib/handle_unsuback.c | 1 - test/lib/c/02-unsubscribe2-v5.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/handle_unsuback.c b/lib/handle_unsuback.c index b79916bc..ca7cf7d9 100644 --- a/lib/handle_unsuback.c +++ b/lib/handle_unsuback.c @@ -86,7 +86,6 @@ int handle__unsuback(struct mosquitto *mosq) return rc; } reason_codes[i] = (int)byte; - i++; } } diff --git a/test/lib/c/02-unsubscribe2-v5.c b/test/lib/c/02-unsubscribe2-v5.c index 3a96f6c3..87a9e24c 100644 --- a/test/lib/c/02-unsubscribe2-v5.c +++ b/test/lib/c/02-unsubscribe2-v5.c @@ -8,7 +8,7 @@ static int run = -1; static void on_connect(struct mosquitto *mosq, void *obj, int rc) { int rc2; - mosquitto_property *proplist; + mosquitto_property *proplist = NULL; (void)obj; if(rc){