diff --git a/daemon/main.c b/daemon/main.c index 3dd7c0ea9..44fa2d493 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -367,7 +367,6 @@ static int if_addr_parse(intf_config_q *q, char *s, struct ifaddrs *ifas) { static int redis_ep_parse(endpoint_t *ep, int *db, char **hostname, char **auth, const char *auth_env, char *s) { char *sl, *sp; long l; - char buf[255]; // max length due to RFC standards sl = strrchr(s, '@'); if (sl) { diff --git a/daemon/redis.c b/daemon/redis.c index 0abd1603e..b34664e15 100644 --- a/daemon/redis.c +++ b/daemon/redis.c @@ -285,9 +285,10 @@ static int redis_connect(struct redis *r, int wait, bool resolve) { if (sockaddr_getaddrinfo(&a, r->hostname)) ilog(LOG_WARN, "Failed to re-resolve remote server hostname: '%s'. Just use older one: '%s'.", r->hostname, r->host); - else + else { sockaddr_print(&a, r->host, sizeof(r->host)); r->endpoint.address = a; + } } r->ctx = redisConnectWithTimeout(r->host, r->endpoint.port, tv);