From 92d76c0c86db945bf31570a6e408793ab6cbc9a9 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 22 Jul 2013 20:16:45 +0800 Subject: [PATCH] Usermode/telnetd - Fixed error from scan-build --- Usermode/Applications/telnetd_src/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 ++; -- 2.20.1