Commit f337dce4 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix a FlexeLint warning



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@5587 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent f8c41d87
......@@ -144,6 +144,7 @@ VSS_resolve(const char *addr, const char *port, struct vss_addr ***vap)
int i, ret;
char *adp, *hop;
*vap = NULL;
memset(&hints, 0, sizeof hints);
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE;
......@@ -284,14 +285,12 @@ VSS_connect(const struct vss_addr *va, int nonblock)
int
VSS_open(const char *str, double tmo)
{
int retval;
int retval = -1;
int nvaddr, n, i;
struct vss_addr **vaddr;
struct pollfd pfd;
nvaddr = VSS_resolve(str, NULL, &vaddr);
if (nvaddr <= 0)
return (-1);
for (n = 0; n < nvaddr; n++) {
retval = VSS_connect(vaddr[n], tmo != 0.0);
if (retval >= 0 && tmo != 0.0) {
......
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