keybind: pointer to string literal should be const

Assigning to (char*) creates a mutable string literal, which was
likely not intended here and wasn't necessary.
This commit is contained in:
John Lindgren 2025-07-04 00:18:53 -04:00 committed by Consolatis
parent ac47be3019
commit cd8a8c2bf6

View file

@ -123,7 +123,7 @@ keybind_create(const char *keybind)
xkb_keysym_t keysyms[MAX_KEYSYMS];
gchar **symnames = g_strsplit(keybind, "-", -1);
for (size_t i = 0; symnames[i]; i++) {
char *symname = symnames[i];
const char *symname = symnames[i];
/*
* Since "-" is used as a separator, a keybind string like "W--"
* becomes "W", "", "". This means that it is impossible to bind