diff options
author | Karel Zak | 2018-07-20 13:58:10 +0200 |
---|---|---|
committer | Karel Zak | 2018-07-20 13:58:10 +0200 |
commit | c8b237a0ed0a1ea58c0237ded2611a0569d03e29 (patch) | |
tree | 027ee7c4860646cb06509452c028135610a50d88 | |
parent | libmount: add missing const (diff) | |
download | kernel-qcow2-util-linux-c8b237a0ed0a1ea58c0237ded2611a0569d03e29.tar.gz kernel-qcow2-util-linux-c8b237a0ed0a1ea58c0237ded2611a0569d03e29.tar.xz kernel-qcow2-util-linux-c8b237a0ed0a1ea58c0237ded2611a0569d03e29.zip |
lib/color-names: const cleanup
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | lib/color-names.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/color-names.c b/lib/color-names.c index 6a302d56a..72add50d7 100644 --- a/lib/color-names.c +++ b/lib/color-names.c @@ -12,8 +12,9 @@ struct ul_color_name { */ static int cmp_color_name(const void *a0, const void *b0) { - struct ul_color_name *a = (struct ul_color_name *) a0, - *b = (struct ul_color_name *) b0; + const struct ul_color_name + *a = (const struct ul_color_name *) a0, + *b = (const struct ul_color_name *) b0; return strcmp(a->name, b->name); } @@ -45,7 +46,7 @@ const char *color_sequence_from_colorname(const char *str) { "reverse", UL_COLOR_REVERSE }, { "yellow", UL_COLOR_BOLD_YELLOW }, }; - struct ul_color_name key = { .name = (char *) str }, *res; + struct ul_color_name key = { .name = str }, *res; if (!str) return NULL; |