From 04bc0031921cee6049c2c3caf70a2539d8fed5be Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Tue, 18 Mar 2008 19:11:32 +0200 Subject: [PATCH] Don't clear gps address, zero gps data. --- src/gps.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/gps.c b/src/gps.c index 8bc3def..718dd55 100644 --- a/src/gps.c +++ b/src/gps.c @@ -115,21 +115,14 @@ gps_clear(Gps *gps) { g_assert(gps); gps->io.fd=-1; -gps->io.address=NULL; gps->io.conn=RCVR_OFF; -gps->io.nmea=NULL; gps->io.nmea_cnt=0; +memset(&gps->data, 0, sizeof(gps->data)); gps->data.fix=FIX_NOFIX; gps->data.lat=60.20; gps->data.lon=22.20; gps->data.satinview=0; gps->data.satinuse=0; -gps->connection_error=NULL; -gps->connection_retry=NULL; -gps->connection_progress=NULL; -gps->update_location=NULL; -gps->update_info=NULL; -gps->update_satellite=NULL; gps_data_integerize(&gps->data); } -- 2.39.5