mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
68 lines
2.5 KiB
Diff
68 lines
2.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Tyler Veness <calcmogul@gmail.com>
|
|
Date: Thu, 13 Jul 2023 23:30:58 -0700
|
|
Subject: [PATCH 08/10] Remove static from array indices
|
|
|
|
---
|
|
src/unix/linux.c | 12 ++++++------
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/src/unix/linux.c b/src/unix/linux.c
|
|
index b23d88bd824843eebc3b439e5a18e6f796a747be..95a2fe2b42895626f207f740bdccfe938915d836 100644
|
|
--- a/src/unix/linux.c
|
|
+++ b/src/unix/linux.c
|
|
@@ -2104,7 +2104,7 @@ static uint64_t uv__read_uint64(const char* filename) {
|
|
* finds the location and length of the memory controller mount path.
|
|
* This disregards the leading / for easy concatenation of paths.
|
|
* Returns NULL if the memory controller wasn't found. */
|
|
-static char* uv__cgroup1_find_memory_controller(char buf[static 1024],
|
|
+static char* uv__cgroup1_find_memory_controller(char buf[1024],
|
|
int* n) {
|
|
char* p;
|
|
|
|
@@ -2125,7 +2125,7 @@ static char* uv__cgroup1_find_memory_controller(char buf[static 1024],
|
|
return p;
|
|
}
|
|
|
|
-static void uv__get_cgroup1_memory_limits(char buf[static 1024], uint64_t* high,
|
|
+static void uv__get_cgroup1_memory_limits(char buf[1024], uint64_t* high,
|
|
uint64_t* max) {
|
|
char filename[4097];
|
|
char* p;
|
|
@@ -2165,7 +2165,7 @@ update_limits:
|
|
*max = UINT64_MAX;
|
|
}
|
|
|
|
-static void uv__get_cgroup2_memory_limits(char buf[static 1024], uint64_t* high,
|
|
+static void uv__get_cgroup2_memory_limits(char buf[1024], uint64_t* high,
|
|
uint64_t* max) {
|
|
char filename[4097];
|
|
char* p;
|
|
@@ -2182,7 +2182,7 @@ static void uv__get_cgroup2_memory_limits(char buf[static 1024], uint64_t* high,
|
|
*high = uv__read_uint64(filename);
|
|
}
|
|
|
|
-static uint64_t uv__get_cgroup_constrained_memory(char buf[static 1024]) {
|
|
+static uint64_t uv__get_cgroup_constrained_memory(char buf[1024]) {
|
|
uint64_t high;
|
|
uint64_t max;
|
|
|
|
@@ -2208,7 +2208,7 @@ uint64_t uv_get_constrained_memory(void) {
|
|
}
|
|
|
|
|
|
-static uint64_t uv__get_cgroup1_current_memory(char buf[static 1024]) {
|
|
+static uint64_t uv__get_cgroup1_current_memory(char buf[1024]) {
|
|
char filename[4097];
|
|
uint64_t current;
|
|
char* p;
|
|
@@ -2232,7 +2232,7 @@ static uint64_t uv__get_cgroup1_current_memory(char buf[static 1024]) {
|
|
return uv__read_uint64("/sys/fs/cgroup/memory/memory.usage_in_bytes");
|
|
}
|
|
|
|
-static uint64_t uv__get_cgroup2_current_memory(char buf[static 1024]) {
|
|
+static uint64_t uv__get_cgroup2_current_memory(char buf[1024]) {
|
|
char filename[4097];
|
|
char* p;
|
|
int n;
|