Commit f7d9a92d authored by Geoff Garside's avatar Geoff Garside Committed by antirez
Browse files

Mark ip string buffers which could be reduced.

In two places buffers have been created with a size of 128 bytes which
could be reduced to INET6_ADDRSTRLEN to still hold a full IP address.
These places have been marked as they are presently big enough to handle
the needs of storing a printable IPv6 address.
parent e6bf4c26
...@@ -306,7 +306,7 @@ void freeClusterLink(clusterLink *link) { ...@@ -306,7 +306,7 @@ void freeClusterLink(clusterLink *link) {
void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) { void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
int cport, cfd; int cport, cfd;
char cip[128]; char cip[128]; /* Could use INET6_ADDRSTRLEN here, but its smaller */
clusterLink *link; clusterLink *link;
REDIS_NOTUSED(el); REDIS_NOTUSED(el);
REDIS_NOTUSED(mask); REDIS_NOTUSED(mask);
......
...@@ -552,7 +552,7 @@ static void acceptCommonHandler(int fd, int flags) { ...@@ -552,7 +552,7 @@ static void acceptCommonHandler(int fd, int flags) {
void acceptTcpHandler(aeEventLoop *el, int fd, void *privdata, int mask) { void acceptTcpHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
int cport, cfd; int cport, cfd;
char cip[128]; char cip[128]; /* Could use INET6_ADDRSTRLEN here, but its smaller */
REDIS_NOTUSED(el); REDIS_NOTUSED(el);
REDIS_NOTUSED(mask); REDIS_NOTUSED(mask);
REDIS_NOTUSED(privdata); REDIS_NOTUSED(privdata);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment