sdsformatip() removed.

Specialized single-use function. Not the best match for sds.c btw.
Also genClientPeerId() is no longer static: we need symbols.
This commit is contained in:
antirez
2014-12-11 18:28:26 +01:00
parent ce269ad3c5
commit bbf0736c4e
4 changed files with 4 additions and 12 deletions

View File

@ -962,15 +962,6 @@ sds sdsjoin(char **argv, int argc, char *sep) {
return join;
}
sds sdsformatip(char *ip, int port) {
if (port >= 0)
return sdscatfmt(sdsempty(),
strchr(ip,':') ? "[%s]:%i" : "%s:%i", ip, port);
else
return sdscatfmt(sdsempty(),
strchr(ip,':') ? "[%s]" : "%s", ip);
}
#ifdef SDS_TEST_MAIN
#include <stdio.h>
#include "testhelp.h"