From: Tilman Sauerbeck Date: Mon, 1 Jan 2018 18:26:37 +0000 (+0100) Subject: Fix misuse of Client_iterate() in Client_voiceMsg(). X-Git-Url: http://git.code-monkey.de/?p=umurmur.git;a=commitdiff_plain;h=d86ec591c19b41ee23a13bce4517670a0401175a Fix misuse of Client_iterate() in Client_voiceMsg(). To start iteration, we need to pass NULL to Client_iterate(). This probably only worked before because the variable got initialized to NULL implicitly. --- diff --git a/src/client.c b/src/client.c index 5b76b7e..856c864 100644 --- a/src/client.c +++ b/src/client.c @@ -983,7 +983,7 @@ int Client_voiceMsg(client_t *client, uint8_t *data, int len) } /* Sessions */ for (i = 0; i < TARGET_MAX_SESSIONS && vt->sessions[i] != -1; i++) { - client_t *c; + client_t *c = NULL; buffer[0] = (uint8_t) (type | 2); Log_debug("Whisper session %d", vt->sessions[i]); while (Client_iterate(&c) != NULL) {