summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hiredis.c8
-rw-r--r--hiredis.h2
-rw-r--r--net.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/hiredis.c b/hiredis.c
index c70ea39..73d0251 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -602,7 +602,7 @@ static redisContext *redisContextInit(void) {
c->reader = redisReaderCreate();
c->tcp.host = NULL;
c->tcp.source_addr = NULL;
- c->unix.path = NULL;
+ c->unix_sock.path = NULL;
c->timeout = NULL;
if (c->obuf == NULL || c->reader == NULL) {
@@ -626,8 +626,8 @@ void redisFree(redisContext *c) {
free(c->tcp.host);
if (c->tcp.source_addr)
free(c->tcp.source_addr);
- if (c->unix.path)
- free(c->unix.path);
+ if (c->unix_sock.path)
+ free(c->unix_sock.path);
if (c->timeout)
free(c->timeout);
free(c);
@@ -658,7 +658,7 @@ int redisReconnect(redisContext *c) {
return redisContextConnectBindTcp(c, c->tcp.host, c->tcp.port,
c->timeout, c->tcp.source_addr);
} else if (c->connection_type == REDIS_CONN_UNIX) {
- return redisContextConnectUnix(c, c->unix.path, c->timeout);
+ return redisContextConnectUnix(c, c->unix_sock.path, c->timeout);
} else {
/* Something bad happened here and shouldn't have. There isn't
enough information in the context to reconnect. */
diff --git a/hiredis.h b/hiredis.h
index 092ded2..b92ee90 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -155,7 +155,7 @@ typedef struct redisContext {
struct {
char *path;
- } unix;
+ } unix_sock;
} redisContext;
diff --git a/net.c b/net.c
index fa0dabe..60a2dc7 100644
--- a/net.c
+++ b/net.c
@@ -422,8 +422,8 @@ int redisContextConnectUnix(redisContext *c, const char *path, const struct time
return REDIS_ERR;
c->connection_type = REDIS_CONN_UNIX;
- if (c->unix.path != path)
- c->unix.path = strdup(path);
+ if (c->unix_sock.path != path)
+ c->unix_sock.path = strdup(path);
if (timeout) {
if (c->timeout != timeout) {