aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-11-26 21:01:04 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-18 12:11:10 +0100
commit88553abf4d9390ab0f2a5fddad0cb034696ed370 (patch)
tree7416d882a8d5516103b76746163074da1decd3bd
parentc92b964e2dec76397329e9005ca277466867cbc6 (diff)
rlc: Use sizeof() for the memset instead of ARRAY_SIZE
In this case both will give the same result but it is better to use sizeof. But it is better to use the raw number of bytes instead of the number of elements.
-rw-r--r--src/rlc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rlc.cpp b/src/rlc.cpp
index f31670ea..d115f767 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -28,7 +28,7 @@ extern "C" {
uint8_t *gprs_rlc_data::prepare(size_t block_data_len)
{
/* todo.. only set it once if it turns out to be a bottleneck */
- memset(block, 0x0, ARRAY_SIZE(block));
+ memset(block, 0x0, sizeof(block));
memset(block, 0x2b, block_data_len);
return block;