From 9c7e8629876fb3ff115902e37fe562641ce9de11 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 6 Sep 2017 19:00:04 -0400 Subject: Clean up C and Python code-checker warnings. --- libgpsd_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgpsd_core.c') diff --git a/libgpsd_core.c b/libgpsd_core.c index ddb22a6d..77992f35 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -230,7 +230,6 @@ static void gpsd_run_device_hook(struct gpsd_errout_t *errout, char *device_name, char *hook) { struct stat statbuf; - char buf[HOOK_CMD_MAX]; if (stat(DEVICEHOOKPATH, &statbuf) == -1) gpsd_log(errout, LOG_PROG, @@ -238,6 +237,7 @@ static void gpsd_run_device_hook(struct gpsd_errout_t *errout, DEVICEHOOKPATH, hook); else { int status; + char buf[HOOK_CMD_MAX]; (void)snprintf(buf, sizeof(buf), "%s %s %s", DEVICEHOOKPATH, device_name, hook); gpsd_log(errout, LOG_INF, "running %s\n", buf); -- cgit v1.2.1