summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-11-02 12:05:22 -0600
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-11-02 20:10:58 -0400
commitac334b2cfbf5e57b5b6510e2f57c5f550bc57cca (patch)
tree65d9c7df0b09f81620438a4a1e68d69387bf8c3d
parent07ecca0dc9d2d8f3b3abd73ab32f254f339fd903 (diff)
downloadsystemd-ac334b2cfbf5e57b5b6510e2f57c5f550bc57cca.tar.gz
systemd-ac334b2cfbf5e57b5b6510e2f57c5f550bc57cca.tar.bz2
systemd-ac334b2cfbf5e57b5b6510e2f57c5f550bc57cca.zip
core: make a constant table actually constant
-rw-r--r--src/core/job.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/job.c b/src/core/job.c
index d8b170b983..ac6910a906 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -690,16 +690,16 @@ _pure_ static const char *job_get_status_message_format(Unit *u, JobType t, JobR
}
static void job_print_status_message(Unit *u, JobType t, JobResult result) {
- static struct {
+ static const struct {
const char *color, *word;
} const statuses[_JOB_RESULT_MAX] = {
- [JOB_DONE] = {ANSI_GREEN, " OK "},
- [JOB_TIMEOUT] = {ANSI_HIGHLIGHT_RED, " TIME "},
- [JOB_FAILED] = {ANSI_HIGHLIGHT_RED, "FAILED"},
- [JOB_DEPENDENCY] = {ANSI_HIGHLIGHT_YELLOW, "DEPEND"},
- [JOB_SKIPPED] = {ANSI_HIGHLIGHT, " INFO "},
- [JOB_ASSERT] = {ANSI_HIGHLIGHT_YELLOW, "ASSERT"},
- [JOB_UNSUPPORTED] = {ANSI_HIGHLIGHT_YELLOW, "UNSUPP"},
+ [JOB_DONE] = { ANSI_GREEN, " OK " },
+ [JOB_TIMEOUT] = { ANSI_HIGHLIGHT_RED, " TIME " },
+ [JOB_FAILED] = { ANSI_HIGHLIGHT_RED, "FAILED" },
+ [JOB_DEPENDENCY] = { ANSI_HIGHLIGHT_YELLOW, "DEPEND" },
+ [JOB_SKIPPED] = { ANSI_HIGHLIGHT, " INFO " },
+ [JOB_ASSERT] = { ANSI_HIGHLIGHT_YELLOW, "ASSERT" },
+ [JOB_UNSUPPORTED] = { ANSI_HIGHLIGHT_YELLOW, "UNSUPP" },
};
const char *format;