diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2019-06-16 16:20:10 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2019-06-16 16:20:10 +0200 |
commit | afe9d4ea3c46b040b90dd3a64eb1ed7d47951600 (patch) | |
tree | fe938388cc7014eae6ceed4efed55242c0604f80 | |
parent | 5388526fd9263053370b9b20e9f12cc007f77477 (diff) |
Encoding: use uint16_t when interacting with the window object
The ESN, SSN and uncompress bitmap len are uint16_t. The Window is using uint16_t in
function arguments and return values. Don't do so many integer conversions.
Change-Id: If62fa09d7bfa8e91ce707824f7019edb1b83da9e
-rw-r--r-- | src/encoding.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/encoding.cpp b/src/encoding.cpp index 0afd55df..90b4a8c2 100644 --- a/src/encoding.cpp +++ b/src/encoding.cpp @@ -837,14 +837,14 @@ static void write_packet_ack_nack_desc_egprs( uint8_t len; bool bow = true; bool eow = true; - int ssn = window->mod_sns(window->v_q() + 1); + uint16_t ssn = window->mod_sns(window->v_q() + 1); unsigned int num_blocks = window->mod_sns(window->v_r() - window->v_q()); - int esn_crbb = window->mod_sns(ssn - 1); + uint16_t esn_crbb = window->mod_sns(ssn - 1); static uint8_t rbb[RLC_EGPRS_MAX_WS] = {'\0'}; uint8_t iter = 0; int is_compressed = 0; bool try_compression = false; - uint8_t ucmp_bmplen; + uint16_t ucmp_bmplen; uint8_t crbb_bitmap[23] = {'\0'}; bitvec ucmp_vec; bitvec crbb_vec; |