aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/wg.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2021-03-10 08:43:56 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2021-03-10 17:35:18 -0700
commit88bc64366e939f916a02e8ac5c341c8df766bac4 (patch)
tree6f0cb88ccfe72cf08820b11b7232f696ac3b3b67 /src/wg.c
parentMakefile: fix version indicator (diff)
downloadwireguard-tools-88bc64366e939f916a02e8ac5c341c8df766bac4.tar.xz
wireguard-tools-88bc64366e939f916a02e8ac5c341c8df766bac4.zip
wireguard-tools: const correctness
Fixes much of the noise from a FreeBSD WARNS=6 build of wg(8) Signed-off-by: Kyle Evans <kevans@FreeBSD.org>
Diffstat (limited to '')
-rw-r--r--src/wg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wg.c b/src/wg.c
index b9952eb..aed70b6 100644
--- a/src/wg.c
+++ b/src/wg.c
@@ -14,7 +14,7 @@ const char *PROG_NAME;
static const struct {
const char *subcommand;
- int (*function)(int, char**);
+ int (*function)(int, const char**);
const char *description;
} subcommands[] = {
{ "show", show_main, "Shows the current configuration and device information" },
@@ -37,7 +37,7 @@ static void show_usage(FILE *file)
fprintf(file, "You may pass `--help' to any of these subcommands to view usage.\n");
}
-int main(int argc, char *argv[])
+int main(int argc, const char *argv[])
{
PROG_NAME = argv[0];
@@ -51,7 +51,7 @@ int main(int argc, char *argv[])
}
if (argc == 1) {
- static char *new_argv[] = { "show", NULL };
+ static const char *new_argv[] = { "show", NULL };
return show_main(1, new_argv);
}