aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmgcp
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-10-02 16:11:15 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-10-12 09:11:25 +0200
commitb45e4d80b6b6b6bb597ccb3a14c16395481f7816 (patch)
treec71e255b8f194ed5ed458d65740741ff3f024c49 /openbsc/src/libmgcp
parent641d387409b6d11f7166784344701438be1a45e1 (diff)
osmux: Do not divide the number of bytes by eight.
sizeof(uint8_t) == 1 and there is no need to create an array with 16 bytes and then only use the first two of them. This means the CID range is from 0 to 127 and we should be able to extend this to 256 by changing the array size to 32. Update the testcase now that we can have more than 16 calls with Osmux.
Diffstat (limited to 'openbsc/src/libmgcp')
-rw-r--r--openbsc/src/libmgcp/mgcp_osmux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/libmgcp/mgcp_osmux.c b/openbsc/src/libmgcp/mgcp_osmux.c
index b0ef69fd4..30a81cbc3 100644
--- a/openbsc/src/libmgcp/mgcp_osmux.c
+++ b/openbsc/src/libmgcp/mgcp_osmux.c
@@ -536,7 +536,7 @@ int osmux_used_cid(void)
{
int i, j, used = 0;
- for (i = 0; i < sizeof(osmux_cid_bitmap) / 8; i++) {
+ for (i = 0; i < sizeof(osmux_cid_bitmap); i++) {
for (j = 0; j < 8; j++) {
if (osmux_cid_bitmap[i] & (1 << j))
used += 1;
@@ -550,7 +550,7 @@ int osmux_get_cid(void)
{
int i, j;
- for (i = 0; i < sizeof(osmux_cid_bitmap) / 8; i++) {
+ for (i = 0; i < sizeof(osmux_cid_bitmap); i++) {
for (j = 0; j < 8; j++) {
if (osmux_cid_bitmap[i] & (1 << j))
continue;