aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/encoding.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/encoding.cpp b/src/encoding.cpp
index ad53b0b..e21a7fc 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -117,13 +117,13 @@ static int write_ta_index(bitvec *dest, int8_t tai)
{
int rc;
- if (tai < 0) /* No TIMING_ADVANCE_INDEX: */
+ if (tai < 0) { /* No TIMING_ADVANCE_INDEX: */
SET_0(dest);
-
- /* TIMING_ADVANCE_INDEX: */
- SET_1(dest);
- rc = bitvec_set_u64(dest, tai, 4, false);
- CHECK(rc);
+ } else { /* TIMING_ADVANCE_INDEX: */
+ SET_1(dest);
+ rc = bitvec_set_u64(dest, tai, 4, false);
+ CHECK(rc);
+ }
return 0;
}