summaryrefslogtreecommitdiffstats
path: root/tests/smscb
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-12-30 13:22:56 +0100
committerHarald Welte <laforge@gnumonks.org>2014-12-30 13:22:56 +0100
commitc993a07ceb8cff0226885d39c6af17f0f903e01a (patch)
treebec73e64c4f3449925ead8cdf4d781905550af79 /tests/smscb
parent61ced83a700aa4426390c2c12326f00d72ec193e (diff)
use the new GSM341 / GSM412 size constants
Diffstat (limited to 'tests/smscb')
-rw-r--r--tests/smscb/gsm0341_test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/smscb/gsm0341_test.c b/tests/smscb/gsm0341_test.c
index 73eddb57..f7f6bc02 100644
--- a/tests/smscb/gsm0341_test.c
+++ b/tests/smscb/gsm0341_test.c
@@ -52,7 +52,7 @@ int main(int argc, char **argv)
{
uint16_t msg_id = GSM341_MSGID_ETWS_CMAS_MONTHLY_TEST;
char *text = "Mahlzeit!";
- char tbuf[94];
+ char tbuf[GSM341_MAX_CHARS+1];
if (argc > 1)
msg_id = atoi(argv[1]);
@@ -60,8 +60,8 @@ int main(int argc, char **argv)
if (argc > 2)
text = argv[2];
- strncpy(tbuf, text, 93);
- if (strlen(text) < 93)
+ strncpy(tbuf, text, GSM341_MAX_CHARS);
+ if (strlen(text) < GSM341_MAX_CHARS)
memset(tbuf+strlen(text), '\r', sizeof(tbuf)-strlen(text));
tbuf[93] = 0;