bk: 4a0dc886Yc3RUBL50LmbO0N27A5Elw
+* [Bug 1174] nmea_shutdown assumes that nmea has a unit assigned
* [Bug 1190] NMEA refclock fudge flag4 1 obscures position in timecode
* Update NMEA refclock documentation in html/drivers/driver20.html
(4.2.5p176) 2009/05/13 Released by Harlan Stenn <stenn@ntp.org>
#endif /* HAVE_PPSAPI */
#ifdef SYS_WINNT
+#undef write /* ports/winnt/include/config.h: #define write _write */
extern int async_write(int, const void *, unsigned int);
#define write(fd, data, octets) async_write(fd, data, octets)
#endif
register struct nmeaunit *up;
struct refclockproc *pp;
+ UNUSED_ARG(unit);
+
pp = peer->procptr;
up = (struct nmeaunit *)pp->unitptr;
#ifdef HAVE_PPSAPI
- if (up->handle != 0)
+ if (NULL != up && up->handle)
time_pps_destroy(up->handle);
#endif /* HAVE_PPSAPI */
io_closeclock(&pp->io);
- free(up);
+ if (NULL != up)
+ free(up);
}
#ifdef HAVE_PPSAPI