aboutsummaryrefslogtreecommitdiffstats
path: root/src
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:09:47 +0100
commit0d80dba26a2f3c204f6a7897c119bd0c1ca87988 (patch)
treea8b037126face0e1c712e09273db73f01589147c /src
parent31833fe6347c3c6bc4a24c514b96af23e5927295 (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.
Diffstat (limited to 'src')
-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;