From 98cbdc6dcad40a2f59ec0ec9ff752a46aa0762de Mon Sep 17 00:00:00 2001 From: Explorer09 Date: Wed, 20 Apr 2022 13:24:17 +0800 Subject: [PATCH] Correct PROCESS_MAX_UID_DIGITS constant The PROCESS_MAX_UID_DIGITS=19 introduced in 696f79fe5099d510fc6ecc6d1e2f0ab3ae29e04e doesn't make sense. The `uid_t` type does not require to be signed in POSIX. If we are to support 64 bits as the maximum size of `uid_t`, then PROCESS_MAX_UID_DIGITS should be 20. (= floor(log10(UINT64_MAX)) + 1). Signed-off-by: Kang-Che Sung --- Process.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Process.h b/Process.h index ebaf230b..a2fa5569 100644 --- a/Process.h +++ b/Process.h @@ -293,7 +293,7 @@ extern uint8_t Process_fieldWidths[LAST_PROCESSFIELD]; #define PROCESS_MIN_PID_DIGITS 5 #define PROCESS_MAX_PID_DIGITS 19 #define PROCESS_MIN_UID_DIGITS 5 -#define PROCESS_MAX_UID_DIGITS 19 +#define PROCESS_MAX_UID_DIGITS 20 extern int Process_pidDigits; extern int Process_uidDigits;