mirror of
https://github.com/ceph/ceph
synced 2024-12-17 17:05:42 +00:00
msgr: fix operator<< for sockaddr_in, too
This commit is contained in:
parent
bde055a19f
commit
529f5b8ac1
@ -21,7 +21,7 @@ inline ostream& operator<<(ostream& out, const sockaddr_storage &ss)
|
||||
|
||||
inline ostream& operator<<(ostream& out, const sockaddr_in &ss)
|
||||
{
|
||||
char buf[NI_MAXHOST];
|
||||
char buf[NI_MAXHOST] = { 0 };
|
||||
getnameinfo((struct sockaddr *)&ss, sizeof(ss), buf, sizeof(buf), 0, 0, NI_NUMERICHOST);
|
||||
return out << buf;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user