endp: do not cache cfg pointer

There is no obvious reason why we would want to complicate the code by
caching pointers, since pointer traversal is probably not a performance
bottleneck, and if it is we should rather take a look at our dozens of
linked lists first..

Change-Id: I2456ba63598f76200d53e00223abf60bb36a49c0
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index 1c0d3cc..a8aad14 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -960,7 +960,7 @@
 static int rqnt_cb(struct mgcp_endpoint *endp, char _tone)
 {
 	ptrdiff_t tone = _tone;
-	endp->cfg->data = (void *)tone;
+	endp->trunk->cfg->data = (void *)tone;
 	return 0;
 }
 
@@ -1050,7 +1050,6 @@
 	memset(&endp, 0, sizeof(endp));
 	cfg = mgcp_config_alloc();
 	trunk = mgcp_trunk_alloc(cfg, MGCP_TRUNK_VIRTUAL, MGCP_VIRT_TRUNK_ID);
-	endp.cfg = cfg;
 	endp.type = &ep_typeset.rtp;
 	trunk->v.vty_number_endpoints = 1;
 	trunk->endpoints = endpoints;
@@ -1307,7 +1306,6 @@
 	state.in_stream.err_ts_ctr = &test_ctr_in;
 	state.out_stream.err_ts_ctr = &test_ctr_out;
 
-	endp.cfg = cfg;
 	endp.type = &ep_typeset.rtp;
 
 	trunk->v.vty_number_endpoints = 1;