aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Reiner Herrmann <reiner@reiner-h.de>2022-10-23 15:48:51 +0200
committerLibravatar Reiner Herrmann <reiner@reiner-h.de>2022-10-23 15:48:57 +0200
commit8fa8ea4c2366bd8ff5222638186df94201b1daa2 (patch)
tree46b674d787743296736ace6cb87484e2ea33c606 /src
parentremove deprecated --shell from man page (diff)
downloadfirejail-8fa8ea4c2366bd8ff5222638186df94201b1daa2.tar.gz
firejail-8fa8ea4c2366bd8ff5222638186df94201b1daa2.tar.zst
firejail-8fa8ea4c2366bd8ff5222638186df94201b1daa2.zip
include limits.h instead of manually defining LINE_MAX
Diffstat (limited to 'src')
-rw-r--r--src/fnettrace/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fnettrace/main.c b/src/fnettrace/main.c
index da5ac02c6..56974e79c 100644
--- a/src/fnettrace/main.c
+++ b/src/fnettrace/main.c
@@ -19,6 +19,7 @@
19*/ 19*/
20#include "fnettrace.h" 20#include "fnettrace.h"
21#include "radix.h" 21#include "radix.h"
22#include <limits.h>
22#include <sys/ioctl.h> 23#include <sys/ioctl.h>
23#define MAX_BUF_SIZE (64 * 1024) 24#define MAX_BUF_SIZE (64 * 1024)
24 25
@@ -190,7 +191,6 @@ static char *print_bw(unsigned units) {
190 return bw_line[units]; 191 return bw_line[units];
191} 192}
192 193
193#define LINE_MAX 200
194static inline void adjust_line(char *str, int len, int cols) { 194static inline void adjust_line(char *str, int len, int cols) {
195 if (len > LINE_MAX) // functions such as snprintf truncate the string, and return the length of the untruncated string 195 if (len > LINE_MAX) // functions such as snprintf truncate the string, and return the length of the untruncated string
196 len = LINE_MAX; 196 len = LINE_MAX;