---
+* [Bug 2808] GPSD_JSON driver enhancements, step 1
+ fix coverity issues with refclock_gpsdjson and refclock_shm
* [Bug 2808] GPSD_JSON driver enhancements, step 1.
Add a few more tallies as per Hal Murray's suggestions
* [Bug 2794] Clean up kernel clock status reports.
#endif
}
}
-
- for (i = parser->toknext - 1; i >= 0; i--) {
- /* Unmatched opened object or array */
- if (tokens[i].start != -1 && tokens[i].end == -1) {
- return JSMN_ERROR_PART;
+ if (tokens != NULL) {
+ for (i = parser->toknext - 1; i >= 0; i--) {
+ /* Unmatched opened object or array */
+ if (tokens[i].start != -1 && tokens[i].end == -1) {
+ return JSMN_ERROR_PART;
+ }
}
}
/* use TPV reference time + PPS receive time */
add_clock_sample(peer, pp, up->sti_stamp, up->pps_recvt);
peer->precision = up->pps_prec;
- //DEAD? up->tc_good += 1;
/* both packets consumed now... */
up->fl_pps = 0;
up->fl_sti = 0;
if (up->fl_sti) {
add_clock_sample(peer, pp, up->sti_stamp, up->sti_recvt);
peer->precision = up->sti_prec;
- //DEAD? up->tc_good += 1;
/* mark time stamp as burned... */
up->fl_sti = 0;
++up->tc_sti_used;
} else {
break;
}
+ /* if skipping ahead returned an error, bail out here. */
+ if (tid < 0)
+ break;
}
return INVALID_TOKEN;
}
msyslog(LOG_ERR, "SHM shmat (unit %d): %m", unit);
return NULL;
}
- return p;
#else