Commit 92c9be48 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use FREE_OBJ() and REPLACE() macros


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1959 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5cf11931
......@@ -328,9 +328,9 @@ bes_Cleanup(struct backend *b)
TAILQ_REMOVE(&bes->connlist, vbe, list);
if (vbe->fd >= 0)
close(vbe->fd);
free(vbe);
FREE_OBJ(vbe);
}
free(bes);
FREE_OBJ(bes);
}
/*--------------------------------------------------------------------*/
......@@ -419,16 +419,13 @@ VRT_init_simple_backend(struct backend **bp, struct vrt_simple_backend *t)
bes->dnsttl = 300;
AN(t->name);
b->vcl_name = strdup(t->name);
XXXAN(b->vcl_name);
REPLACE(b->vcl_name, t->name);
AN(t->port);
bes->portname = strdup(t->port);
XXXAN(bes->portname);
REPLACE(bes->portname, t->port);
AN(t->host);
bes->hostname = strdup(t->host);
XXXAN(bes->hostname);
REPLACE(bes->hostname, t->host);
*bp = b;
}
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