summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorZbigniew Chyla <zbigniew.chyla@nsn.com>2015-01-13 07:19:30 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-13 07:19:30 -0500
commit679ad1b39528615dbaeb22bc741b93dc3c3ee4fb (patch)
tree28a1d78ac0e73e1cacd1428366ab86f61253859f /gpsmon.c
parent0dfc815a83d036fcdd027e331c77b7da330246e5 (diff)
downloadgpsd-679ad1b39528615dbaeb22bc741b93dc3c3ee4fb.tar.gz
Cleanup of string function and sizeof usage. All regression tests pass.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsmon.c b/gpsmon.c
index ad2b9ac6..edadd2b7 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -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();