James Kuszmaul | b13e13f | 2023-11-22 20:44:04 -0800 | [diff] [blame^] | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | From: Tyler Veness <calcmogul@gmail.com> |
| 3 | Date: Thu, 13 Jul 2023 23:30:58 -0700 |
| 4 | Subject: [PATCH 09/10] Remove static from array indices |
| 5 | |
| 6 | --- |
| 7 | src/unix/linux.c | 12 ++++++------ |
| 8 | 1 file changed, 6 insertions(+), 6 deletions(-) |
| 9 | |
| 10 | diff --git a/src/unix/linux.c b/src/unix/linux.c |
| 11 | index e3dfb186dc531e5c8197a81681c00d693e0913c6..d365b623a0a25228f0c6acf1fa14a5c7a9f1efbf 100644 |
| 12 | --- a/src/unix/linux.c |
| 13 | +++ b/src/unix/linux.c |
| 14 | @@ -2060,7 +2060,7 @@ static uint64_t uv__read_uint64(const char* filename) { |
| 15 | * finds the location and length of the memory controller mount path. |
| 16 | * This disregards the leading / for easy concatenation of paths. |
| 17 | * Returns NULL if the memory controller wasn't found. */ |
| 18 | -static char* uv__cgroup1_find_memory_controller(char buf[static 1024], |
| 19 | +static char* uv__cgroup1_find_memory_controller(char buf[1024], |
| 20 | int* n) { |
| 21 | char* p; |
| 22 | |
| 23 | @@ -2081,7 +2081,7 @@ static char* uv__cgroup1_find_memory_controller(char buf[static 1024], |
| 24 | return p; |
| 25 | } |
| 26 | |
| 27 | -static void uv__get_cgroup1_memory_limits(char buf[static 1024], uint64_t* high, |
| 28 | +static void uv__get_cgroup1_memory_limits(char buf[1024], uint64_t* high, |
| 29 | uint64_t* max) { |
| 30 | char filename[4097]; |
| 31 | char* p; |
| 32 | @@ -2121,7 +2121,7 @@ update_limits: |
| 33 | *max = UINT64_MAX; |
| 34 | } |
| 35 | |
| 36 | -static void uv__get_cgroup2_memory_limits(char buf[static 1024], uint64_t* high, |
| 37 | +static void uv__get_cgroup2_memory_limits(char buf[1024], uint64_t* high, |
| 38 | uint64_t* max) { |
| 39 | char filename[4097]; |
| 40 | char* p; |
| 41 | @@ -2138,7 +2138,7 @@ static void uv__get_cgroup2_memory_limits(char buf[static 1024], uint64_t* high, |
| 42 | *high = uv__read_uint64(filename); |
| 43 | } |
| 44 | |
| 45 | -static uint64_t uv__get_cgroup_constrained_memory(char buf[static 1024]) { |
| 46 | +static uint64_t uv__get_cgroup_constrained_memory(char buf[1024]) { |
| 47 | uint64_t high; |
| 48 | uint64_t max; |
| 49 | |
| 50 | @@ -2164,7 +2164,7 @@ uint64_t uv_get_constrained_memory(void) { |
| 51 | } |
| 52 | |
| 53 | |
| 54 | -static uint64_t uv__get_cgroup1_current_memory(char buf[static 1024]) { |
| 55 | +static uint64_t uv__get_cgroup1_current_memory(char buf[1024]) { |
| 56 | char filename[4097]; |
| 57 | uint64_t current; |
| 58 | char* p; |
| 59 | @@ -2188,7 +2188,7 @@ static uint64_t uv__get_cgroup1_current_memory(char buf[static 1024]) { |
| 60 | return uv__read_uint64("/sys/fs/cgroup/memory/memory.usage_in_bytes"); |
| 61 | } |
| 62 | |
| 63 | -static uint64_t uv__get_cgroup2_current_memory(char buf[static 1024]) { |
| 64 | +static uint64_t uv__get_cgroup2_current_memory(char buf[1024]) { |
| 65 | char filename[4097]; |
| 66 | char* p; |
| 67 | int n; |