summaryrefslogtreecommitdiff
path: root/libgps_sock.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2011-03-28 18:53:11 -0400
committerEric S. Raymond <esr@thyrsus.com>2011-03-28 18:53:11 -0400
commitc651976d406e14ee43b48357c86b7b78d6e94821 (patch)
tree308816b29c9992ff89938013a6226bf9deb49c4f /libgps_sock.c
parent2807b4d18ae2a229c45e54f8423015c1ef8c371d (diff)
downloadgpsd-c651976d406e14ee43b48357c86b7b78d6e94821.tar.gz
Scan-build and splint cleanup. All regression tests pass.
Diffstat (limited to 'libgps_sock.c')
-rw-r--r--libgps_sock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgps_sock.c b/libgps_sock.c
index 0134391e..4bf5121f 100644
--- a/libgps_sock.c
+++ b/libgps_sock.c
@@ -53,13 +53,13 @@ struct privdata_t
int gps_sock_open(/*@null@*/const char *host, /*@null@*/const char *port,
/*@out@*/ struct gps_data_t *gpsdata)
{
- libgps_debug_trace((DEBUG_CALLS, "gps_sock_open(%s, %s)\n", host, port));
-
if (!host)
host = "localhost";
if (!port)
port = DEFAULT_GPSD_PORT;
+ libgps_debug_trace((DEBUG_CALLS, "gps_sock_open(%s, %s)\n", host, port));
+
#ifndef USE_QT
if ((gpsdata->gps_fd =
netlib_connectsock(AF_UNSPEC, host, port, "tcp")) < 0) {