diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-06 08:06:51 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-06 08:07:42 -0500 |
commit | d93ba6e008cb6a7f75adf3d4c08876cf96fe95b0 (patch) | |
tree | dad294889820f98f7d7a9e50e0f9baac12796977 /gps2udp.c | |
parent | f597416e78989e83b67608a4fb0542e2b33554d5 (diff) | |
download | gpsd-d93ba6e008cb6a7f75adf3d4c08876cf96fe95b0.tar.gz |
More cppcheck cleanup. All regression tests pass. PPS is live.
Diffstat (limited to 'gps2udp.c')
-rw-r--r-- | gps2udp.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -83,7 +83,6 @@ static int send_udp (char *nmeastring, size_t ind) char message [255]; char *buffer; int channel; - ssize_t status; /* if string length is unknown make a copy and compute it */ if (ind == 0) { @@ -109,6 +108,7 @@ static int send_udp (char *nmeastring, size_t ind) /* send message on udp channel */ /*@-type@*/ for (channel=0; channel < udpchannel; channel ++) { + ssize_t status; status = sendto(sock[channel], buffer, ind, @@ -128,14 +128,14 @@ static int send_udp (char *nmeastring, size_t ind) static int open_udp(char **hostport) /* Open and bind udp socket to host */ { - struct hostent *hp; - char *hostname = NULL; - char *portname = NULL; - int portnum, channel; - + int channel; for (channel=0; channel <udpchannel; channel ++) { - /* parse argument */ + struct hostent *hp; + char *hostname = NULL; + char *portname = NULL; + int portnum; + /* parse argument */ /*@-unrecog@*/ hostname = strsep(&hostport[channel], ":"); portname = strsep(&hostport[channel], ":"); |