From 965af14d150f2e96aa0494ed9106e646e40553e4 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 10 Jan 2022 09:41:26 -0500 Subject: remove compile warning --- src/fnettrace/hostnames.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/fnettrace/hostnames.c') diff --git a/src/fnettrace/hostnames.c b/src/fnettrace/hostnames.c index 733d13853..5422166e6 100644 --- a/src/fnettrace/hostnames.c +++ b/src/fnettrace/hostnames.c @@ -23,6 +23,7 @@ int geoip_calls = 0; static int geoip_not_found = 0; +static char buf[MAXBUF]; char *retrieve_hostname(uint32_t ip) { if (geoip_not_found) @@ -37,7 +38,6 @@ char *retrieve_hostname(uint32_t ip) { FILE *fp = popen(cmd, "r"); if (fp) { char *ptr; - char buf[MAXBUF]; if (fgets(buf, MAXBUF, fp)) { ptr = strchr(buf, '\n'); if (ptr) -- cgit v1.2.3-54-g00ecf