Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

AddrInfo: Fix error message generation when node == NULL

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
  • Loading branch information...
commit b39da20edc6025a9120e5959ea2e4dc8f0bd7604 1 parent 5532117
@andersk andersk authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/network/network.cc
View
2  src/network/network.cc
@@ -207,7 +207,7 @@ class AddrInfo {
res( NULL ) {
int errcode = getaddrinfo( node, service, hints, &res );
if ( errcode != 0 ) {
- throw NetworkException( std::string( "Bad IP address (" ) + node + "): " + gai_strerror( errcode ), 0 );
+ throw NetworkException( std::string( "Bad IP address (" ) + (node != NULL ? node : "(null)") + "): " + gai_strerror( errcode ), 0 );
}
}
~AddrInfo() { freeaddrinfo(res); }
Please sign in to comment.
Something went wrong with that request. Please try again.