diff options
author | Jeff Garzik <jgarzik@exmulti.com> | 2012-05-01 15:02:41 -0700 |
---|---|---|
committer | Jeff Garzik <jgarzik@exmulti.com> | 2012-05-01 15:02:41 -0700 |
commit | ca97bde8ff53f2604d601061af1f0ff6e2a37487 (patch) | |
tree | 6eb856be2653fb54bcc642c9dc8fc60a03d96131 /src | |
parent | 50d710496dabcfe8d771483fcfe16d52953ec73c (diff) | |
parent | 1c94f88d5ecddd4f0d03e1c2751f6414a04ee73b (diff) |
Merge pull request #1171 from Diapolo/fix_compiler_warn
fix 2 compiler warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/net.cpp | 4 | ||||
-rw-r--r-- | src/util.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index d218dcfb5d..92b4a3173f 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1585,12 +1585,16 @@ void StartNode(void* parg) { vector<CNetAddr> vaddr; if (LookupHost(pszHostName, vaddr)) + { BOOST_FOREACH (const CNetAddr &addr, vaddr) + { if (!addr.IsLocal()) { addrLocalHost.SetIP(addr); break; } + } + } } #else // Get local host ip diff --git a/src/util.cpp b/src/util.cpp index cd3d3b94a9..3569f22ecd 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -252,7 +252,7 @@ inline int OutputDebugStringF(const char* pszFormat, ...) *pend = '\0'; char* p1 = pszBuffer; char* p2; - while (p2 = strchr(p1, '\n')) + while ((p2 = strchr(p1, '\n'))) { p2++; char c = *p2; |