This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Max gerrit-no-reply at lists.osmocom.org
Review at https://gerrit.osmocom.org/5730
cosmetic: inline single-use helper
Change-Id: I5ec54ccd9c4bf8344fbd1dce91e8707f6b17b2f7
---
M src/encoding.cpp
1 file changed, 6 insertions(+), 12 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/30/5730/1
diff --git a/src/encoding.cpp b/src/encoding.cpp
index aaa51e6..443024b 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -71,17 +71,6 @@
return true;
}
-/* { 0 | 1 < TIMING_ADVANCE_VALUE : bit (6) > } */
-static inline void write_ta(bitvec *dest, unsigned& wp, int8_t ta)
-{
- if (ta < 0) /* No TIMING_ADVANCE_VALUE: */
- bitvec_write_field(dest, &wp, 0, 1);
- else { /* TIMING_ADVANCE_VALUE: */
- bitvec_write_field(dest, &wp, 1, 1);
- bitvec_write_field(dest, &wp, ta, 6);
- }
-}
-
/* 3GPP TS 44.060 Table 12.5.2.1 */
static inline uint16_t enc_ws(uint16_t ws)
{
@@ -105,7 +94,12 @@
static inline void write_ta_ie(bitvec *dest, unsigned& wp,
int8_t ta, int8_t tai, uint8_t ts)
{
- write_ta(dest, wp, ta);
+ if (ta < 0) /* No TIMING_ADVANCE_VALUE: */
+ bitvec_write_field(dest, &wp, 0, 1);
+ else { /* TIMING_ADVANCE_VALUE: */
+ bitvec_write_field(dest, &wp, 1, 1);
+ bitvec_write_field(dest, &wp, ta, 6);
+ }
if (write_tai(dest, wp, tai)) /* TIMING_ADVANCE_TIMESLOT_NUMBER: */
bitvec_write_field(dest, &wp, ts, 3);
}
--
To view, visit https://gerrit.osmocom.org/5730
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ec54ccd9c4bf8344fbd1dce91e8707f6b17b2f7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>