summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2012-05-16 20:42:26 -0400
committerEric S. Raymond <esr@thyrsus.com>2012-05-16 20:42:26 -0400
commitddc22ff56acef0690abfd22ee640cda4eb143933 (patch)
treebcbccbbab554a3e2915abfad9b5fe91a6604ff08 /gpsd.c
parent61ab6a6636762115689a190b4a9fe3386008d24c (diff)
downloadgpsd-ddc22ff56acef0690abfd22ee640cda4eb143933.tar.gz
Cleanup motivated by new cppcheck with more tests. All regression tests pass.
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsd.c b/gpsd.c
index 5d9c23eb..010b8966 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -838,7 +838,6 @@ static void handle_control(int sfd, char *buf)
ignore_return(write(sfd, "ERROR\n", 6));
} else {
size_t len;
- int st;
*eq++ = '\0';
len = strlen(eq) + 5;
if ((devp = find_device(stash)) != NULL) {
@@ -847,6 +846,7 @@ static void handle_control(int sfd, char *buf)
sfd);
ignore_return(write(sfd, "ERROR\n", 6));
} else {
+ int st;
/* NOTE: this destroys the original buffer contents */
st = gpsd_hexpack(eq, eq, len);
if (st <= 0) {