From 15e37522ff3ce8fd6ffd7d30b8ece13187648cd9 Mon Sep 17 00:00:00 2001 From: Geoff Garside Date: Sat, 18 Jun 2011 19:34:16 +0100 Subject: [PATCH] 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. --- src/cluster.c | 2 +- src/networking.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cluster.c b/src/cluster.c index f635c389b..b2b5ca43f 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -306,7 +306,7 @@ void freeClusterLink(clusterLink *link) { void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) { int cport, cfd; - char cip[128]; + char cip[128]; /* Could use INET6_ADDRSTRLEN here, but its smaller */ clusterLink *link; REDIS_NOTUSED(el); REDIS_NOTUSED(mask); diff --git a/src/networking.c b/src/networking.c index b493f16a8..1d157aec3 100644 --- a/src/networking.c +++ b/src/networking.c @@ -552,7 +552,7 @@ static void acceptCommonHandler(int fd, int flags) { void acceptTcpHandler(aeEventLoop *el, int fd, void *privdata, int mask) { int cport, cfd; - char cip[128]; + char cip[128]; /* Could use INET6_ADDRSTRLEN here, but its smaller */ REDIS_NOTUSED(el); REDIS_NOTUSED(mask); REDIS_NOTUSED(privdata);