From: John Hodge Date: Mon, 22 Jul 2013 12:16:45 +0000 (+0800) Subject: Usermode/telnetd - Fixed error from scan-build X-Git-Tag: rel0.15~340 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=92d76c0c86db945bf31570a6e408793ab6cbc9a9;p=tpg%2Facess2.git Usermode/telnetd - Fixed error from scan-build --- diff --git a/Usermode/Applications/telnetd_src/main.c b/Usermode/Applications/telnetd_src/main.c index 16dac830..78115181 100644 --- a/Usermode/Applications/telnetd_src/main.c +++ b/Usermode/Applications/telnetd_src/main.c @@ -10,6 +10,7 @@ #include #include #include +#include // === TYPES === typedef struct sClient @@ -108,7 +109,7 @@ void EventLoop(void) void Server_NewClient(int FD) { - tClient *clt; + tClient *clt = NULL; // TODO: Is this done in the IPStack? if( giNumClients == giConfig_MaxClients ) @@ -126,6 +127,7 @@ void Server_NewClient(int FD) break; } } + assert(clt); // Accept the connection clt->Socket = _SysOpenChild(FD, "", OPENFLAG_READ|OPENFLAG_WRITE); giNumClients ++;