diff options
author | Pau Espin Pedrol <pespin@espeweb.net> | 2021-03-02 12:28:32 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@espeweb.net> | 2021-03-02 12:28:32 +0100 |
commit | a70bf72ce5c6577b960503dc7a50cb69a129a9de (patch) | |
tree | 3538adf5133d194f2285d763330e19abca98a03b /src | |
parent | 9688dc9acaa86b9c9f181d822482d08b8308d146 (diff) |
llc: use memset to fill llc dummy frame padding
Change-Id: Iaa55549f979ca23dad0bddd308c1144aa4b17255
Diffstat (limited to 'src')
-rw-r--r-- | src/llc.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/llc.cpp b/src/llc.cpp index 470e1545..e508d0b1 100644 --- a/src/llc.cpp +++ b/src/llc.cpp @@ -59,8 +59,10 @@ void gprs_llc::put_dummy_frame(size_t req_len) /* Add further stuffing, if the requested length exceeds the minimum * dummy command length */ - while (m_length < req_len) - frame[m_length++] = 0x2b; + if (m_length < req_len) { + memset(&frame[m_length], 0x2b, req_len - m_length); + m_length = req_len; + } } void gprs_llc::put_frame(const uint8_t *data, size_t len) |