aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-05-11 15:15:47 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-05-14 16:52:49 -0300
commit874cf79422f168c4c583645b41227ec57aefda2e (patch)
tree5b9e2f90b54383d01089a26dd052e3a87eb8fecb /src
parentStandardize version output (diff)
downloadfirejail-874cf79422f168c4c583645b41227ec57aefda2e.tar.gz
firejail-874cf79422f168c4c583645b41227ec57aefda2e.tar.zst
firejail-874cf79422f168c4c583645b41227ec57aefda2e.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/firecfg/main.c2
-rw-r--r--src/firejail/usage.c2
-rw-r--r--src/firemon/usage.c4
-rw-r--r--src/jailcheck/main.c2
4 files changed, 5 insertions, 5 deletions
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;
24char *arg_bindir = "/usr/local/bin"; 24char *arg_bindir = "/usr/local/bin";
25int arg_guide = 0; 25int arg_guide = 0;
26 26
27static char *usage_str = 27static const char *const usage_str =
28 "Firecfg is the desktop configuration utility for Firejail software. The utility\n" 28 "Firecfg is the desktop configuration utility for Firejail software. The utility\n"
29 "creates several symbolic links to firejail executable. This allows the user to\n" 29 "creates several symbolic links to firejail executable. This allows the user to\n"
30 "sandbox applications automatically, just by clicking on a regular desktop\n" 30 "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 @@
19*/ 19*/
20#include "firejail.h" 20#include "firejail.h"
21 21
22static char *usage_str = 22static const char *const usage_str =
23 "Firejail is a SUID sandbox program that reduces the risk of security breaches by\n" 23 "Firejail is a SUID sandbox program that reduces the risk of security breaches by\n"
24 "restricting the running environment of untrusted applications using Linux\n" 24 "restricting the running environment of untrusted applications using Linux\n"
25 "namespaces.\n" 25 "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 @@
19*/ 19*/
20#include "firemon.h" 20#include "firemon.h"
21 21
22static char *help_str = 22static const char *const usage_str =
23 "Usage: firemon [OPTIONS] [PID]\n\n" 23 "Usage: firemon [OPTIONS] [PID]\n\n"
24 "Monitor processes started in a Firejail sandbox. Without any PID specified,\n" 24 "Monitor processes started in a Firejail sandbox. Without any PID specified,\n"
25 "all processes started by Firejail are monitored. Descendants of these processes\n" 25 "all processes started by Firejail are monitored. Descendants of these processes\n"
@@ -84,5 +84,5 @@ void print_version(void) {
84 84
85void usage(void) { 85void usage(void) {
86 print_version(); 86 print_version();
87 puts(help_str); 87 puts(usage_str);
88} 88}
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;
29char *user_run_dir = NULL; 29char *user_run_dir = NULL;
30int arg_debug = 0; 30int arg_debug = 0;
31 31
32static char *usage_str = 32static const char *const usage_str =
33 "Usage: jailcheck [options] directory [directory]\n\n" 33 "Usage: jailcheck [options] directory [directory]\n\n"
34 "Options:\n" 34 "Options:\n"
35 " --debug - print debug messages.\n" 35 " --debug - print debug messages.\n"