aboutsummaryrefslogtreecommitdiffstats
path: root/src/fnettrace/hostnames.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fnettrace/hostnames.c')
-rw-r--r--src/fnettrace/hostnames.c2
1 files changed, 1 insertions, 1 deletions
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 @@
23 23
24int geoip_calls = 0; 24int geoip_calls = 0;
25static int geoip_not_found = 0; 25static int geoip_not_found = 0;
26static char buf[MAXBUF];
26 27
27char *retrieve_hostname(uint32_t ip) { 28char *retrieve_hostname(uint32_t ip) {
28 if (geoip_not_found) 29 if (geoip_not_found)
@@ -37,7 +38,6 @@ char *retrieve_hostname(uint32_t ip) {
37 FILE *fp = popen(cmd, "r"); 38 FILE *fp = popen(cmd, "r");
38 if (fp) { 39 if (fp) {
39 char *ptr; 40 char *ptr;
40 char buf[MAXBUF];
41 if (fgets(buf, MAXBUF, fp)) { 41 if (fgets(buf, MAXBUF, fp)) {
42 ptr = strchr(buf, '\n'); 42 ptr = strchr(buf, '\n');
43 if (ptr) 43 if (ptr)