diff options
author | Reiner Herrmann <reiner@reiner-h.de> | 2022-10-23 15:48:51 +0200 |
---|---|---|
committer | Reiner Herrmann <reiner@reiner-h.de> | 2022-10-23 15:48:57 +0200 |
commit | 8fa8ea4c2366bd8ff5222638186df94201b1daa2 (patch) | |
tree | 46b674d787743296736ace6cb87484e2ea33c606 | |
parent | remove deprecated --shell from man page (diff) | |
download | firejail-8fa8ea4c2366bd8ff5222638186df94201b1daa2.tar.gz firejail-8fa8ea4c2366bd8ff5222638186df94201b1daa2.tar.zst firejail-8fa8ea4c2366bd8ff5222638186df94201b1daa2.zip |
include limits.h instead of manually defining LINE_MAX
-rw-r--r-- | src/fnettrace/main.c | 2 |
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 | ||
194 | static inline void adjust_line(char *str, int len, int cols) { | 194 | static 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; |