diff options
author | Zbigniew Chyla <zbigniew.chyla@nsn.com> | 2015-01-13 07:19:30 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-01-13 07:19:30 -0500 |
commit | 679ad1b39528615dbaeb22bc741b93dc3c3ee4fb (patch) | |
tree | 28a1d78ac0e73e1cacd1428366ab86f61253859f /gpsmon.c | |
parent | 0dfc815a83d036fcdd027e331c77b7da330246e5 (diff) | |
download | gpsd-679ad1b39528615dbaeb22bc741b93dc3c3ee4fb.tar.gz |
Cleanup of string function and sizeof usage. All regression tests pass.
Diffstat (limited to 'gpsmon.c')
-rw-r--r-- | gpsmon.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -661,7 +661,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED) #endif /* NTPSHM_ENABLE */ #if defined(PPS_ENABLE) && defined(CONTROL_SOCKET_ENABLE) - if (!serial && strncmp((char*)device->lexer.outbuffer, "{\"class\":\"PPS\",", 13) == 0) + if (!serial && strncmp((char*)device->lexer.outbuffer, "{\"class\":\"PPS\",", 15) == 0) { const char *end = NULL; struct gps_data_t noclobber; @@ -713,7 +713,7 @@ static void gpsmon_hook(struct gps_device_t *device, gps_mask_t changed UNUSED) (int)device->lexer.outbuflen); cond_hexdump(buf + strlen(buf), sizeof(buf) - strlen(buf), (char *)device->lexer.outbuffer,device->lexer.outbuflen); - (void)strlcat(buf, "\n", sizeof(buf) - strlen(buf)); + (void)strlcat(buf, "\n", sizeof(buf)); } report_lock(); |