From 874cf79422f168c4c583645b41227ec57aefda2e Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Thu, 11 May 2023 15:15:47 -0300 Subject: Standardize usage string var declarations Changes: * Name them all "usage_str" * Make them const For the latter item, see commit eb20f52ef ("Make list of paths const to fix a false positive of gcc analyzer", 2022-07-27) / PR #5275. --- src/firecfg/main.c | 2 +- src/firejail/usage.c | 2 +- src/firemon/usage.c | 4 ++-- src/jailcheck/main.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/firecfg/main.c b/src/firecfg/main.c index c9dc27b1b..855523e55 100644 --- a/src/firecfg/main.c +++ b/src/firecfg/main.c @@ -24,7 +24,7 @@ int arg_debug = 0; char *arg_bindir = "/usr/local/bin"; int arg_guide = 0; -static char *usage_str = +static const char *const usage_str = "Firecfg is the desktop configuration utility for Firejail software. The utility\n" "creates several symbolic links to firejail executable. This allows the user to\n" "sandbox applications automatically, just by clicking on a regular desktop\n" diff --git a/src/firejail/usage.c b/src/firejail/usage.c index 35f54d113..00a86f426 100644 --- a/src/firejail/usage.c +++ b/src/firejail/usage.c @@ -19,7 +19,7 @@ */ #include "firejail.h" -static char *usage_str = +static const char *const usage_str = "Firejail is a SUID sandbox program that reduces the risk of security breaches by\n" "restricting the running environment of untrusted applications using Linux\n" "namespaces.\n" diff --git a/src/firemon/usage.c b/src/firemon/usage.c index 0fb9908c5..411fc1600 100644 --- a/src/firemon/usage.c +++ b/src/firemon/usage.c @@ -19,7 +19,7 @@ */ #include "firemon.h" -static char *help_str = +static const char *const usage_str = "Usage: firemon [OPTIONS] [PID]\n\n" "Monitor processes started in a Firejail sandbox. Without any PID specified,\n" "all processes started by Firejail are monitored. Descendants of these processes\n" @@ -84,5 +84,5 @@ void print_version(void) { void usage(void) { print_version(); - puts(help_str); + puts(usage_str); } diff --git a/src/jailcheck/main.c b/src/jailcheck/main.c index e30ffb274..27da309ea 100644 --- a/src/jailcheck/main.c +++ b/src/jailcheck/main.c @@ -29,7 +29,7 @@ char *user_home_dir = NULL; char *user_run_dir = NULL; int arg_debug = 0; -static char *usage_str = +static const char *const usage_str = "Usage: jailcheck [options] directory [directory]\n\n" "Options:\n" " --debug - print debug messages.\n" -- cgit v1.2.3-54-g00ecf