summaryrefslogtreecommitdiff
path: root/net_remotegpsd.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2009-07-09 21:49:05 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2009-07-09 21:49:05 +0000
commit92938e4782c82af08e4ffda40af291c0dc2f1d98 (patch)
tree57f79ad767bdae73aa3709d9f52195f829c9c59c /net_remotegpsd.c
parentd64918bc1678e2dc3e2264c7d850019949e04ca9 (diff)
downloadgpsd-92938e4782c82af08e4ffda40af291c0dc2f1d98.tar.gz
system call failure should be tested against -1, rather than "< 0"
Diffstat (limited to 'net_remotegpsd.c')
-rw-r--r--net_remotegpsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net_remotegpsd.c b/net_remotegpsd.c
index 1cbc6c71..bffdd411 100644
--- a/net_remotegpsd.c
+++ b/net_remotegpsd.c
@@ -32,7 +32,7 @@ static int remotegpsd_device_probe(const char *host,
int dsock;
char buf[BUFSIZ];
- if ((dsock = netlib_connectsock(host, port, "tcp")) < 0) {
+ if ((dsock = netlib_connectsock(host, port, "tcp")) == -1) {
gpsd_report(LOG_WARN, "remotegpsd device probe connect error %d\n", dsock);
return -1;
}