diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-07-22 18:14:36 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-07-22 21:54:19 +0200 |
commit | af109b9fa9a4282fcd6d1ac0f7ad001d306f57f4 (patch) | |
tree | 32245bd8ba35e41e8cd061b815c22db24d61e5fb /openbsc/src | |
parent | a0b0f36ff0b917105039b7aa9dba41a41f7c1d32 (diff) |
[abis_nm] fix 2 bugs in parsing IPA Test response messages
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/abis_nm.c | 4 |
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) |