diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-28 12:13:46 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-28 12:13:46 -0400 |
commit | 37ec3513a76284d096c781293c1be281480b7c33 (patch) | |
tree | 410c6445bfa604d732e49a0d632dfc0e5b07e0b3 /cgps.c | |
parent | af09bce6ea5351939dd4aa6ed6cc20123d57e4b4 (diff) | |
download | gpsd-37ec3513a76284d096c781293c1be281480b7c33.tar.gz |
splint cleanup.
Diffstat (limited to 'cgps.c')
-rw-r--r-- | cgps.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -474,8 +474,9 @@ static void update_compass_panel(struct gps_data_t *gpsdata) } #endif /* TRUENORTH */ -/* This gets called once for each new GPS sentence. */ +/*@-mustfreefresh@*/ static void update_gps_panel(struct gps_data_t *gpsdata) +/* This gets called once for each new GPS sentence. */ { int i, j, n; int newstate; @@ -704,8 +705,8 @@ static void update_gps_panel(struct gps_data_t *gpsdata) } /* Be quiet if the user requests silence. */ - if (!silent_flag && raw_flag) { - (void)waddstr(messages, gps_data(gpsdata)); + if (!silent_flag && raw_flag && (s = gps_data(gpsdata)) != NULL) { + (void)waddstr(messages, s); } /* Reset the status_timer if the state has changed. */ @@ -720,6 +721,7 @@ static void update_gps_panel(struct gps_data_t *gpsdata) (void)wrefresh(messages); } } +/*@+mustfreefresh@*/ static void usage(char *prog) { |