MT#61556 fix typo and remove unused variable

Change-Id: Icf75d4e0a0e7eb7ddcd247f568b7b3485541e09f
pull/1880/head
Richard Fuchs 1 year ago
parent 5ad662901b
commit e1055bef1a

@ -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) { static int redis_ep_parse(endpoint_t *ep, int *db, char **hostname, char **auth, const char *auth_env, char *s) {
char *sl, *sp; char *sl, *sp;
long l; long l;
char buf[255]; // max length due to RFC standards
sl = strrchr(s, '@'); sl = strrchr(s, '@');
if (sl) { if (sl) {

@ -285,10 +285,11 @@ static int redis_connect(struct redis *r, int wait, bool resolve) {
if (sockaddr_getaddrinfo(&a, r->hostname)) if (sockaddr_getaddrinfo(&a, r->hostname))
ilog(LOG_WARN, "Failed to re-resolve remote server hostname: '%s'. Just use older one: '%s'.", ilog(LOG_WARN, "Failed to re-resolve remote server hostname: '%s'. Just use older one: '%s'.",
r->hostname, r->host); r->hostname, r->host);
else else {
sockaddr_print(&a, r->host, sizeof(r->host)); sockaddr_print(&a, r->host, sizeof(r->host));
r->endpoint.address = a; r->endpoint.address = a;
} }
}
r->ctx = redisConnectWithTimeout(r->host, r->endpoint.port, tv); r->ctx = redisConnectWithTimeout(r->host, r->endpoint.port, tv);

Loading…
Cancel
Save