summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2017-09-06 19:00:04 -0400
committerEric S. Raymond <esr@thyrsus.com>2017-09-06 19:00:04 -0400
commit9c7e8629876fb3ff115902e37fe562641ce9de11 (patch)
tree08ca2e4206ccc0dbda2ee946d907763ae9166aab /drivers.c
parentdb56959e1cf2670edb02f27f25580bb4272e9df2 (diff)
downloadgpsd-9c7e8629876fb3ff115902e37fe562641ce9de11.tar.gz
Clean up C and Python code-checker warnings.
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers.c b/drivers.c
index ebbcc6d6..f1057ca8 100644
--- a/drivers.c
+++ b/drivers.c
@@ -1608,7 +1608,7 @@ static void path_rewrite(struct gps_device_t *session, char *prefix)
* beginning of the path attribute, followed by a # to separate it
* from the device.
*/
- char *prefloc, *sfxloc;
+ char *prefloc;
assert(prefix != NULL && session->lexer.outbuffer != NULL);
@@ -1620,6 +1620,7 @@ static void path_rewrite(struct gps_device_t *session, char *prefix)
prefloc < (char *)session->lexer.outbuffer+session->lexer.outbuflen;
prefloc++)
if (str_starts_with(prefloc, prefix)) {
+ char *sfxloc;
char copy[sizeof(session->lexer.outbuffer)+1];
(void)strlcpy(copy,
(char *)session->lexer.outbuffer,