From 2a62d13b260430097cb4adab0f64901cfb2b13dc Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 11 May 2012 14:41:31 -0400 Subject: Still working on pacifying Coverity. All regression tests pass. --- libgps_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgps_core.c') diff --git a/libgps_core.c b/libgps_core.c index 687b8b82..d3822a48 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) { + if (status == -1 && gpsdata->gps_fd != -1) { status = gps_sock_read(gpsdata); } #endif /* SOCKET_EXPORT_ENABLE */ -- cgit v1.2.1