diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-11-07 11:36:58 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2012-11-07 13:35:14 +0100 |
commit | 3dfe8a1705528a964b7328db9cc9eb29d30ec2cc (patch) | |
tree | ef47817af1e1b3dfdd2858aa3586fa60cc23b6b2 /openbsc/src/osmo-bsc_nat | |
parent | e2f34d588c710db809da6bcfc9a85f3f09468201 (diff) |
nat: sizeof char * != sizeof char[], make the code work on 64bit systems
The test cases were failing on 64bit systems because the sizeof
code operated on the pointer size which is 8 and longer than the
size that was intended to be used for comparing it.
Diffstat (limited to 'openbsc/src/osmo-bsc_nat')
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c index d78dc91bc..e5384d1a7 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c @@ -557,13 +557,13 @@ static void patch_mgcp(struct msgb *output, const char *op, const char *tok, /* we need to replace some strings... */ struct msgb *bsc_mgcp_rewrite(char *input, int length, int endpoint, const char *ip, int port) { - static const char *crcx_str = "CRCX "; - static const char *dlcx_str = "DLCX "; - static const char *mdcx_str = "MDCX "; + static const char crcx_str[] = "CRCX "; + static const char dlcx_str[] = "DLCX "; + static const char mdcx_str[] = "MDCX "; - static const char *ip_str = "c=IN IP4 "; - static const char *aud_str = "m=audio "; - static const char *fmt_str = "a=fmtp: "; + static const char ip_str[] = "c=IN IP4 "; + static const char aud_str[] = "m=audio "; + static const char fmt_str[] = "a=fmtp:"; char buf[128]; char *running, *token; |