summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-03-07 13:09:55 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-03-07 13:09:55 -0500
commitededbc7a7039418e3715ea88e8272b0e6543a174 (patch)
tree42d1df18bcd1ab93040ca3bae1b59718121963c2 /libgpsd_core.c
parentdefba0a279480f6342b5399da9e89e4694577c28 (diff)
downloadgpsd-ededbc7a7039418e3715ea88e8272b0e6543a174.tar.gz
Remove a confusing duplication of a memset() call. All regression tests pass.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index ff013ad3..f2f33ec5 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -317,11 +317,6 @@ void gpsd_init(struct gps_device_t *session, struct gps_context_t *context,
const char *device)
/* initialize GPS polling */
{
- /* clear some times */
-#ifdef PPS_ENABLE
- memset((void *)&session->pps_thread, '\0', sizeof(session->pps_thread));
-#endif /* PPS_ENABLE */
-
/*@ -mayaliasunique @*/
if (device != NULL)
(void)strlcpy(session->gpsdata.dev.path, device,
@@ -396,6 +391,7 @@ void gpsd_deactivate(struct gps_device_t *session)
/*@-usereleased -compdef@*/
void gpsd_clear(struct gps_device_t *session)
+/* clear a device's storage for use */
{
session->gpsdata.online = timestamp();
#ifdef SIRF_ENABLE
@@ -414,7 +410,7 @@ void gpsd_clear(struct gps_device_t *session)
/* clear the private data union */
memset( (void *)&session->driver, '\0', sizeof(session->driver));
#ifdef PPS_ENABLE
- /* clear some times */
+ /* clear the context structure for the PPS thread monitor */
memset((void *)&session->pps_thread, 0, sizeof(session->pps_thread));
#endif /* PPS_ENABLE */