Skip to content
Snippets Groups Projects
Commit 4f9b50dd authored by Adrien Béraud's avatar Adrien Béraud
Browse files

print_addr: use ostringstream insted of stringstream

parent d6d73efa
No related branches found
No related tags found
No related merge requests found
......@@ -106,7 +106,7 @@ print_addr(const sockaddr* sa, socklen_t slen)
{
char hbuf[NI_MAXHOST];
char sbuf[NI_MAXSERV];
std::stringstream out;
std::ostringstream out;
if (sa and slen and !getnameinfo(sa, slen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV)) {
if (sa->sa_family == AF_INET6)
out << "[" << hbuf << "]";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment