acl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH attr/committed] tools: mark long_options static & const


From: Mike Frysinger
Subject: [PATCH attr/committed] tools: mark long_options static & const
Date: Sat, 10 Dec 2022 14:38:02 +0545

This is read-only data, so don't include it in the read/write page.
---
 tools/getfattr.c | 2 +-
 tools/setfattr.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/getfattr.c b/tools/getfattr.c
index abdd0d4b17ba..b610b23bbef1 100644
--- a/tools/getfattr.c
+++ b/tools/getfattr.c
@@ -38,7 +38,7 @@
 #define CMD_LINE_OPTIONS "n:de:m:hRLP"
 #define CMD_LINE_SPEC "[-hRLP] [-n name|-d] [-e en] [-m pattern] path..."
 
-struct option long_options[] = {
+static const struct option long_options[] = {
        { "name",               1, 0, 'n' },
        { "dump",               0, 0, 'd' },
        { "encoding",           1, 0, 'e' },
diff --git a/tools/setfattr.c b/tools/setfattr.c
index b2e1df0d0223..c4e2d79d9f9d 100644
--- a/tools/setfattr.c
+++ b/tools/setfattr.c
@@ -38,7 +38,7 @@
 #define CMD_LINE_SPEC1 "{-n name} [-v value] [-h] file..."
 #define CMD_LINE_SPEC2 "{-x name} [-h] file..."
 
-struct option long_options[] = {
+static const struct option long_options[] = {
        { "name",               1, 0, 'n' }, 
        { "remove",             1, 0, 'x' },
        { "value",              1, 0, 'v' },
-- 
2.38.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]