diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-05-07 15:25:03 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-05-07 15:25:03 -0400 |
commit | 3940cb5995bba3a05061f31ce220d546f306bdc1 (patch) | |
tree | dfb03756f5137bd32467821a54f40534bd3affdf /drivers.c | |
parent | 628b0179b02c97a97d5d0cfe6edce2de1ef00e03 (diff) | |
download | gpsd-3940cb5995bba3a05061f31ce220d546f306bdc1.tar.gz |
Magic-number elimination.
Diffstat (limited to 'drivers.c')
-rw-r--r-- | drivers.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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]); |