summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpspipe.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gpspipe.c b/gpspipe.c
index 18278ea7..797d7bdb 100644
--- a/gpspipe.c
+++ b/gpspipe.c
@@ -347,10 +347,14 @@ int main( int argc, char **argv)
}
}
}
- } else if (readbytes < 0) {
- (void) fprintf(stderr, "gpspipe: read error %s(%d)\n",
+ } else {
+ if (readbytes < 0) {
+ (void) fprintf(stderr, "gpspipe: read error %s(%d)\n",
strerror(errno), errno);
- exit(1);
+ exit(1);
+ } else {
+ exit(0);
+ }
}
}