diff options
-rw-r--r-- | src/fcopy/main.c | 3 | ||||
-rw-r--r-- | src/fnettrace/hostnames | 2 | ||||
-rw-r--r-- | src/fnettrace/main.c | 7 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/fcopy/main.c b/src/fcopy/main.c index a9443a764..c64d20127 100644 --- a/src/fcopy/main.c +++ b/src/fcopy/main.c | |||
@@ -200,7 +200,8 @@ static char *proc_pid_to_self(const char *target) { | |||
200 | 200 | ||
201 | // check where /proc/self points to | 201 | // check where /proc/self points to |
202 | static const char proc_self[] = "/proc/self"; | 202 | static const char proc_self[] = "/proc/self"; |
203 | if (!(proc_pid = realpath(proc_self, NULL))) | 203 | proc_pid = realpath(proc_self, NULL); |
204 | if (proc_pid == NULL) | ||
204 | goto done; | 205 | goto done; |
205 | 206 | ||
206 | // redirect /proc/PID/xxx -> /proc/self/XXX | 207 | // redirect /proc/PID/xxx -> /proc/self/XXX |
diff --git a/src/fnettrace/hostnames b/src/fnettrace/hostnames index 6b7a19689..a808a3b09 100644 --- a/src/fnettrace/hostnames +++ b/src/fnettrace/hostnames | |||
@@ -66,7 +66,7 @@ | |||
66 | 9.9.9.0/24 Quad9 DNS | 66 | 9.9.9.0/24 Quad9 DNS |
67 | 45.90.28.0/22 NextDNS | 67 | 45.90.28.0/22 NextDNS |
68 | 149.112.112.0/24 Quad9 DNS | 68 | 149.112.112.0/24 Quad9 DNS |
69 | 149.112.120.0/21 CIRA DNS Csnada | 69 | 149.112.120.0/21 CIRA DNS Canada |
70 | 176.103.128.0/19 Adguard DNS | 70 | 176.103.128.0/19 Adguard DNS |
71 | 185.228.168.0/24 Cleanbrowsing DNS | 71 | 185.228.168.0/24 Cleanbrowsing DNS |
72 | 193.0.0.0/21 whois.ripe.net Netherlands | 72 | 193.0.0.0/21 whois.ripe.net Netherlands |
diff --git a/src/fnettrace/main.c b/src/fnettrace/main.c index 40025590e..ab65268fd 100644 --- a/src/fnettrace/main.c +++ b/src/fnettrace/main.c | |||
@@ -221,16 +221,15 @@ static void hnode_print(unsigned bw) { | |||
221 | bw = adjust_bandwidth(bw); | 221 | bw = adjust_bandwidth(bw); |
222 | char stats[31]; | 222 | char stats[31]; |
223 | if (bw > (1024 * 1024 * DISPLAY_INTERVAL)) | 223 | if (bw > (1024 * 1024 * DISPLAY_INTERVAL)) |
224 | sprintf(stats, "%d MB/s ", bw / (1024 * 1024 * DISPLAY_INTERVAL)); | 224 | sprintf(stats, "%u MB/s ", bw / (1024 * 1024 * DISPLAY_INTERVAL)); |
225 | else | 225 | else |
226 | sprintf(stats, "%d KB/s ", bw / (1024 * DISPLAY_INTERVAL)); | 226 | sprintf(stats, "%u KB/s ", bw / (1024 * DISPLAY_INTERVAL)); |
227 | int len = snprintf(line, LINE_MAX, "%32s geoip %d, IP database %d\n", stats, geoip_calls, radix_nodes); | 227 | int len = snprintf(line, LINE_MAX, "%32s geoip %d, IP database %d\n", stats, geoip_calls, radix_nodes); |
228 | adjust_line(line, len, cols); | 228 | adjust_line(line, len, cols); |
229 | printf("%s", line); | 229 | printf("%s", line); |
230 | 230 | ||
231 | HNode *ptr = dlist; | 231 | HNode *ptr = dlist; |
232 | HNode *prev = NULL; | 232 | HNode *prev = NULL; |
233 | int row = 0; | ||
234 | while (ptr) { | 233 | while (ptr) { |
235 | HNode *next = ptr->dnext; | 234 | HNode *next = ptr->dnext; |
236 | if (--ptr->ttl > 0) { | 235 | if (--ptr->ttl > 0) { |
@@ -242,7 +241,7 @@ static void hnode_print(unsigned bw) { | |||
242 | snprintf(bytes, 11, "%u KB/s", | 241 | snprintf(bytes, 11, "%u KB/s", |
243 | (unsigned) (ptr->bytes / (DISPLAY_INTERVAL * 1024))); | 242 | (unsigned) (ptr->bytes / (DISPLAY_INTERVAL * 1024))); |
244 | else | 243 | else |
245 | snprintf(bytes, 11, "%u B/s", (unsigned) (ptr->bytes / DISPLAY_INTERVAL)); | 244 | snprintf(bytes, 11, "%u B/s ", (unsigned) (ptr->bytes / DISPLAY_INTERVAL)); |
246 | 245 | ||
247 | char *hostname = ptr->hostname; | 246 | char *hostname = ptr->hostname; |
248 | if (!hostname) | 247 | if (!hostname) |