diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2011-03-10 15:47:42 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2011-03-10 15:47:42 -0500 |
commit | 4708bae6a03d982df70e64846b644152f2659b76 (patch) | |
tree | b2bc505f7cfadae9e57f50110aef7546967b9fe8 /libgps_core.c | |
parent | 947c427e3691fb4bd2c49585e7478198c9481219 (diff) | |
download | gpsd-4708bae6a03d982df70e64846b644152f2659b76.tar.gz |
Clear errno at an appropruaye place in gps_read().
Diffstat (limited to 'libgps_core.c')
-rw-r--r-- | libgps_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libgps_core.c b/libgps_core.c index 32f1ede7..d59f3839 100644 --- a/libgps_core.c +++ b/libgps_core.c @@ -540,6 +540,8 @@ int gps_read(/*@out@*/struct gps_data_t *gpsdata) if (*eol != '\n') eol = NULL; + errno = 0; + if (eol == NULL) { #ifndef USE_QT /* read data: return -1 if no data waiting or buffered, 0 otherwise */ |