summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2010-05-07 15:25:03 -0400
committerEric S. Raymond <esr@thyrsus.com>2010-05-07 15:25:03 -0400
commit3940cb5995bba3a05061f31ce220d546f306bdc1 (patch)
treedfb03756f5137bd32467821a54f40534bd3affdf /drivers.c
parent628b0179b02c97a97d5d0cfe6edce2de1ef00e03 (diff)
downloadgpsd-3940cb5995bba3a05061f31ce220d546f306bdc1.tar.gz
Magic-number elimination.
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers.c b/drivers.c
index 31ab2753..0848780a 100644
--- a/drivers.c
+++ b/drivers.c
@@ -950,9 +950,9 @@ gps_mask_t processMTK3301(int c UNUSED, char *field[],
switch (msg = atoi(&(field[0])[4])) {
case 705: /* */
- (void)strlcat(session->subtype, field[1], 64);
- (void)strlcat(session->subtype, "-", 64);
- (void)strlcat(session->subtype, field[2], 64);
+ (void)strlcat(session->subtype, field[1], sizeof(session->subtype));
+ (void)strlcat(session->subtype, "-", sizeof(session->subtype));
+ (void)strlcat(session->subtype, field[2], sizeof(session->subtype));
return 0; /* return a unknown sentence, which will cause the driver switch */
case 001: /* ACK / NACK */
reason = atoi(field[2]);