From 99860de3c9b5809110538e1ab2d4e216d77b5aaf Mon Sep 17 00:00:00 2001 From: Giel van Schijndel Date: Thu, 11 Aug 2011 13:41:01 +0200 Subject: Make some global variables less-global (static) Explicitly make these global variables less-global to reduce the maximum scope of this global state. In my experience global variables tend to be a major source of bugs. As such the less accessible they are the less likely they are to be the source of a bug. Signed-off-by: Giel van Schijndel --- src/net.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/net.cpp') diff --git a/src/net.cpp b/src/net.cpp index 3953f021e9..df98457c72 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -50,10 +50,10 @@ bool fClient = false; bool fAllowDNS = false; uint64 nLocalServices = (fClient ? 0 : NODE_NETWORK); CAddress addrLocalHost("0.0.0.0", 0, false, nLocalServices); -CNode* pnodeLocalHost = NULL; +static CNode* pnodeLocalHost = NULL; uint64 nLocalHostNonce = 0; array vnThreadsRunning; -SOCKET hListenSocket = INVALID_SOCKET; +static SOCKET hListenSocket = INVALID_SOCKET; vector vNodes; CCriticalSection cs_vNodes; -- cgit v1.2.3