From 4b1bee31b7281f34c872e901c643bf4bde241873 Mon Sep 17 00:00:00 2001 From: deuce <> Date: Wed, 19 Oct 2011 08:48:24 +0000 Subject: [PATCH] Zero first variable rather than use a partially initialized structure. --- src/sbbs3/userdat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c index e7602ab537..82822cbe34 100644 --- a/src/sbbs3/userdat.c +++ b/src/sbbs3/userdat.c @@ -2734,13 +2734,15 @@ void DLLCALL loginSuccess(link_list_t* list, SOCKADDR_IN* addr) ulong DLLCALL loginFailure(link_list_t* list, SOCKADDR_IN* addr, const char* prot, const char* user, const char* pass) { list_node_t* node; - login_attempt_t first={0}; + login_attempt_t first; login_attempt_t* attempt=&first; ulong count=0; if(list==NULL) return 0; + memset(&first, 0, sizeof(first)); + listLock(list); if((node=login_attempted(list, addr)) != NULL) { attempt=node->data; -- GitLab