aboutsummaryrefslogtreecommitdiffstats
path: root/src/fnettrace/hostnames.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2022-01-10 09:41:26 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2022-01-10 09:41:26 -0500
commit965af14d150f2e96aa0494ed9106e646e40553e4 (patch)
treee0603c39acc3d11cb9dd89e6a40d2668aa61bc19 /src/fnettrace/hostnames.c
parentnettrace (diff)
downloadfirejail-965af14d150f2e96aa0494ed9106e646e40553e4.tar.gz
firejail-965af14d150f2e96aa0494ed9106e646e40553e4.tar.zst
firejail-965af14d150f2e96aa0494ed9106e646e40553e4.zip
remove compile warning
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)