[PATCH] orangefs: make static read-only arrays modes and orangefs_modes const

From: Colin Ian King
Date: Sun Jan 23 2022 - 18:20:47 EST


The static arrays modes and orangefs_modes are read-only so it makes
sense to make them const.

Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>
---
fs/orangefs/orangefs-utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/orangefs/orangefs-utils.c b/fs/orangefs/orangefs-utils.c
index 46b7dcff18ac..87d83d08470d 100644
--- a/fs/orangefs/orangefs-utils.c
+++ b/fs/orangefs/orangefs-utils.c
@@ -538,13 +538,13 @@ __s32 ORANGEFS_util_translate_mode(int mode)
{
int ret = 0;
int i = 0;
- static int modes[NUM_MODES] = {
+ static const int modes[NUM_MODES] = {
S_IXOTH, S_IWOTH, S_IROTH,
S_IXGRP, S_IWGRP, S_IRGRP,
S_IXUSR, S_IWUSR, S_IRUSR,
S_ISGID, S_ISUID
};
- static int orangefs_modes[NUM_MODES] = {
+ static const int orangefs_modes[NUM_MODES] = {
ORANGEFS_O_EXECUTE, ORANGEFS_O_WRITE, ORANGEFS_O_READ,
ORANGEFS_G_EXECUTE, ORANGEFS_G_WRITE, ORANGEFS_G_READ,
ORANGEFS_U_EXECUTE, ORANGEFS_U_WRITE, ORANGEFS_U_READ,
--
2.33.1