diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-09-27 16:07:50 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-09-27 16:07:50 -0400 |
commit | 7800222b3ddb462a6ab92f0f1950abf78eabf10b (patch) | |
tree | 7efea7787d531318f9cc400910e31668e6a70091 /libgps_shm.c | |
parent | e7ad4f5d8ccb1203b6590c763444755c58a1d759 (diff) | |
download | gpsd-7800222b3ddb462a6ab92f0f1950abf78eabf10b.tar.gz |
More API convergence.
Diffstat (limited to 'libgps_shm.c')
-rw-r--r-- | libgps_shm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libgps_shm.c b/libgps_shm.c index 61690d1c..065fd6f0 100644 --- a/libgps_shm.c +++ b/libgps_shm.c @@ -127,8 +127,7 @@ int gps_shm_mainloop(struct gps_data_t *gpsdata, int timeout, if ((*hook)(gpsdata, false) != 0) break; } else { - (void)gps_shm_read(gpsdata); - if ((*hook)(gpsdata, true) != 0) + if (gps_shm_read(gpsdata) == -1 && (*hook)(gpsdata, true) != 0) break; } } |