aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_nm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2010-07-22 18:14:36 +0200
committerHarald Welte <laforge@gnumonks.org>2010-07-22 21:54:19 +0200
commitaf109b9fa9a4282fcd6d1ac0f7ad001d306f57f4 (patch)
tree32245bd8ba35e41e8cd061b815c22db24d61e5fb /openbsc/src/abis_nm.c
parenta0b0f36ff0b917105039b7aa9dba41a41f7c1d32 (diff)
[abis_nm] fix 2 bugs in parsing IPA Test response messages
Diffstat (limited to 'openbsc/src/abis_nm.c')
-rw-r--r--openbsc/src/abis_nm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c
index 58f47d2d5..2d8f687ec 100644
--- a/openbsc/src/abis_nm.c
+++ b/openbsc/src/abis_nm.c
@@ -2963,7 +2963,7 @@ int ipac_parse_bcch_info(struct ipac_bcch_info *binf, u_int8_t *buf)
u_int8_t *cur = buf;
u_int16_t len;
- memset(binf, 0, sizeof(binf));
+ memset(binf, 0, sizeof(*binf));
if (cur[0] != NM_IPAC_EIE_BCCH_INFO)
return -EINVAL;
@@ -2978,7 +2978,7 @@ int ipac_parse_bcch_info(struct ipac_bcch_info *binf, u_int8_t *buf)
if (binf->info_type & IPAC_BINF_FREQ_ERR_QUAL)
binf->freq_qual = *cur >> 2;
- binf->arfcn = *cur++ & 3 << 8;
+ binf->arfcn = (*cur++ & 3) << 8;
binf->arfcn |= *cur++;
if (binf->info_type & IPAC_BINF_RXLEV)