From: Wen Yang <[email protected]>
Since these static variables (i_zero and i_one_hundred) are only used for
boundary checks and will not be changed, remove it and use the ones in
our shared const array.
Signed-off-by: Wen Yang <[email protected]>
Cc: Luis Chamberlain <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Joel Granados <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: [email protected]
---
lib/test_sysctl.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/test_sysctl.c b/lib/test_sysctl.c
index 9321d850931f..ee69dd277a1e 100644
--- a/lib/test_sysctl.c
+++ b/lib/test_sysctl.c
@@ -26,8 +26,6 @@
#include <linux/delay.h>
#include <linux/vmalloc.h>
-static int i_zero;
-static int i_one_hundred = 100;
static int match_int_ok = 1;
@@ -78,8 +76,8 @@ static struct ctl_table test_table[] = {
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec_minmax,
- .extra1 = &i_zero,
- .extra2 = &i_one_hundred,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_ONE_HUNDRED,
},
{
.procname = "int_0002",
--
2.25.1