AnetFormatIP(): renamed, commented, now sticks to IP:port format.

A few code style changes + consistent format: not nice for humans but
better for parsers.
This commit is contained in:
antirez
2014-12-11 18:20:30 +01:00
parent 491881e13b
commit ce269ad3c5
6 changed files with 15 additions and 14 deletions

View File

@ -56,7 +56,7 @@ char *replicationGetSlaveName(redisClient *c) {
buf[0] = '\0';
if (anetPeerToString(c->fd,ip,sizeof(ip),NULL) != -1) {
if (c->slave_listening_port)
anetFormatIP(buf,sizeof(buf),ip,c->slave_listening_port);
anetFormatAddr(buf,sizeof(buf),ip,c->slave_listening_port);
else
snprintf(buf,sizeof(buf),"%s:<unknown-slave-port>",ip);
} else {