[CLEANUP] stream_interface: use inline functions to manipulate targets
The connection target involves a type and a union of pointers, let's
make the code cleaner using simple wrappers.
diff --git a/src/peers.c b/src/peers.c
index 06ad244..3e07a27 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1157,8 +1157,7 @@
s->si[0].err_type = SI_ET_NONE;
s->si[0].err_loc = NULL;
s->si[0].connect = NULL;
- s->si[0].target.ptr.v = NULL;
- s->si[0].target.type = TARG_TYPE_NONE;
+ clear_target(&s->si[0].target);
s->si[0].exp = TICK_ETERNITY;
s->si[0].flags = SI_FL_NONE;
if (s->fe->options2 & PR_O2_INDEPSTR)
@@ -1176,8 +1175,7 @@
s->si[1].err_type = SI_ET_NONE;
s->si[1].err_loc = NULL;
s->si[1].connect = tcpv4_connect_server;
- s->si[1].target.ptr.p = s->be;
- s->si[1].target.type = TARG_TYPE_PROXY;
+ set_target_proxy(&s->si[1].target, s->be);
s->si[1].exp = TICK_ETERNITY;
s->si[1].flags = SI_FL_NONE;
if (s->be->options2 & PR_O2_INDEPSTR)
@@ -1187,8 +1185,7 @@
s->si[1].release = NULL;
s->srv = s->srv_conn = NULL;
- s->target.type = TARG_TYPE_NONE;
- s->target.ptr.v = NULL;
+ clear_target(&s->target);
s->pend_pos = NULL;
/* init store persistence */