summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-06-26 14:51:59 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-06-26 16:47:36 (EDT)
commit2c0ed0fce7ca91c007aca6a51fac95e71092bdaf (patch)
tree5ac4677acab3d70d5830e52c3667cd96e0d3c091
parent0bafa47bc5da21caebede1749df3bba825a4a2ac (diff)
main: Make globals static const
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 6777f08..b33c268 100644
--- a/src/main.c
+++ b/src/main.c
@@ -36,9 +36,9 @@
extern const char *PACKAGE_VERSION_GIT;
-const char *_optstring = "bc:d:s:f:F:lLhV";
+static const char *_OPTSTRING = "bc:d:s:f:F:lLhV";
#ifdef HAVE_GETOPT_LONG
-struct option _longopts[] = {
+static const struct option _LONGOPTS[] = {
{
.name = "build",
.has_arg = 0,
@@ -248,10 +248,10 @@ main(int argc, char *argv[])
opt_l = 0;
opt_L = 0;
#ifdef HAVE_GETOPT_LONG
- while ((opt = getopt_long(argc, argv, _optstring, _longopts, NULL))
+ while ((opt = getopt_long(argc, argv, _OPTSTRING, _LONGOPTS, NULL))
!= -1) {
#else
- while ((opt = getopt(argc, argv, _optstring)) != -1) {
+ while ((opt = getopt(argc, argv, _OPTSTRING)) != -1) {
#endif
switch(opt) {
case 'b':