diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-10 07:52:12 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-10 07:52:12 +0000 |
commit | dad8b2b68113840c826e43e3857c487498271c85 (patch) | |
tree | 6d4ee128c976f402e842b7799d2151ebd19bceb1 /driver_aivdm.c | |
parent | dbda81f426dc8cc2d2271b5efbe022d50a5f7732 (diff) | |
download | gpsd-dad8b2b68113840c826e43e3857c487498271c85.tar.gz |
Bride of the Splint Cleanup. All regression tests pass.
Diffstat (limited to 'driver_aivdm.c')
-rw-r--r-- | driver_aivdm.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/driver_aivdm.c b/driver_aivdm.c index f4a91e12..8f90eaf4 100644 --- a/driver_aivdm.c +++ b/driver_aivdm.c @@ -53,7 +53,7 @@ static void from_sixbit(char *bitvec, uint start, int count, char *to) } /*@ +charint @*/ -bool aivdm_decode(char *buf, size_t buflen, +bool aivdm_decode(const char *buf, size_t buflen, struct aivdm_context_t *ais_context, struct ais_t *ais) { char *sixbits[64] = { @@ -83,9 +83,7 @@ bool aivdm_decode(char *buf, size_t buflen, gpsd_report(LOG_PROG, "AIVDM packet length %zd: %s", buflen, buf); /* extract packet fields */ - (void)strlcpy((char *)ais_context->fieldcopy, - (char*)buf, - buflen); + (void)strlcpy((char *)ais_context->fieldcopy, buf, buflen); ais_context->field[nfields++] = (unsigned char *)buf; for (cp = ais_context->fieldcopy; cp < ais_context->fieldcopy + buflen; |