summaryrefslogtreecommitdiff
path: root/libgps_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-09-22 11:23:37 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-09-22 11:23:37 -0400
commit462c4f60c92ccf28dbcab56a6c1befe1722a6374 (patch)
treef4d43b39b71734f1c5a379ed11bf4da4926237b4 /libgps_core.c
parentd72e5707c0b322ae7596016089045ff975cedf70 (diff)
downloadgpsd-462c4f60c92ccf28dbcab56a6c1befe1722a6374.tar.gz
Fix a dangerous typo caught by Coverity. All regression tests pass.
Diffstat (limited to 'libgps_core.c')
-rw-r--r--libgps_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgps_core.c b/libgps_core.c
index 855154fd..1c68dbb3 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -140,7 +140,7 @@ int gps_read(struct gps_data_t *gpsdata)
#endif /* SHM_EXPORT_ENABLE */
#ifdef SOCKET_EXPORT_ENABLE
- if (status == -1 && BAD_SOCKET((intptr_t)(gpsdata->gps_fd))) {
+ if (status == -1 && !BAD_SOCKET((intptr_t)(gpsdata->gps_fd))) {
status = gps_sock_read(gpsdata);
}
#endif /* SOCKET_EXPORT_ENABLE */