From 2c0ed0fce7ca91c007aca6a51fac95e71092bdaf Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Mon, 26 Jun 2023 14:51:59 -0400 Subject: main: Make globals static const --- 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': -- cgit v0.9.1