alloc: Remove code duplication for downlink assignment

There was no difference but there is no point in poking in the
internals of the tbf, pdch and trx from various places. Information
hiding has a real purpose, e.g. compare with reading "the mythical
man month".
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index 0cc0f37..68f7bd6 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -109,6 +109,16 @@
 	tbf->dir.ul.usf[ts] = usf;
 }
 
+static void assign_dlink_tbf(
+				struct gprs_rlcmac_pdch *pdch,
+				int ts,
+				struct gprs_rlcmac_tbf *tbf)
+{
+	tbf->trx->dl_tbf[tbf->tfi] = tbf;
+	pdch->dl_tbf[tbf->tfi] = tbf;
+	tbf->pdch[ts] = pdch;
+}
+
 
 /* Slot Allocation: Algorithm A
  *
@@ -151,9 +161,7 @@
 		assign_uplink_tbf_usf(pdch, ts, tbf, usf);
 	} else {
 		LOGP(DRLCMAC, LOGL_DEBUG, "- Assign downlink TS=%d\n", ts);
-		tbf->trx->dl_tbf[tbf->tfi] = tbf;
-		pdch->dl_tbf[tbf->tfi] = tbf;
-		tbf->pdch[ts] = pdch;
+		assign_dlink_tbf(pdch, ts, tbf);
 	}
 	/* the only one TS is the common TS */
 	tbf->first_ts = tbf->first_common_ts = ts;
@@ -542,9 +550,7 @@
 				LOGP(DRLCMAC, LOGL_DEBUG, "- Assigning DL TS "
 					"%d\n", ts);
 				pdch = &tbf->trx->pdch[ts];
-				tbf->trx->dl_tbf[tbf->tfi] = tbf;
-				pdch->dl_tbf[tbf->tfi] = tbf;
-				tbf->pdch[ts] = pdch;
+				assign_dlink_tbf(pdch, ts, tbf);
 				slotcount++;
 				if (slotcount == 1)
 					tbf->first_ts = ts;