[MERGED] osmo-bsc[master]: HO: cosmetic: bsc_handover_start(): "fix" memcpy for AMR config

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Feb 16 15:37:13 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: HO: cosmetic: bsc_handover_start(): "fix" memcpy for AMR config
......................................................................


HO: cosmetic: bsc_handover_start(): "fix" memcpy for AMR config

memcpy obviously needs the byte size, not the ARRAY_SIZE. For the uint8_t
arrays, these are incidentally the same number, but semantically it should be
sizeof.

Change-Id: I97b6ac05192ad477b246a23ce00c5c91abfd938a
---
M src/libbsc/handover_logic.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libbsc/handover_logic.c b/src/libbsc/handover_logic.c
index 684e3f3..20ecc6c 100644
--- a/src/libbsc/handover_logic.c
+++ b/src/libbsc/handover_logic.c
@@ -139,8 +139,8 @@
 	new_lchan->bs_power = old_lchan->bs_power;
 	new_lchan->rsl_cmode = old_lchan->rsl_cmode;
 	new_lchan->tch_mode = old_lchan->tch_mode;
-	memcpy(&new_lchan->mr_ms_lv, &old_lchan->mr_ms_lv, ARRAY_SIZE(new_lchan->mr_ms_lv));
-	memcpy(&new_lchan->mr_bts_lv, &old_lchan->mr_bts_lv, ARRAY_SIZE(new_lchan->mr_bts_lv));
+	memcpy(&new_lchan->mr_ms_lv, &old_lchan->mr_ms_lv, sizeof(new_lchan->mr_ms_lv));
+	memcpy(&new_lchan->mr_bts_lv, &old_lchan->mr_bts_lv, sizeof(new_lchan->mr_bts_lv));
 
 	new_lchan->conn = old_lchan->conn;
 	new_lchan->conn->ho_lchan = new_lchan;

-- 
To view, visit https://gerrit.osmocom.org/6462
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I97b6ac05192ad477b246a23ce00c5c91abfd938a
Gerrit-PatchSet: 3
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list