keymap: Variable "layout" should be const

Signed-off-by: drkhsh <me@drkhsh.at>
This commit is contained in:
planet36 2021-03-05 14:35:24 -05:00 committed by drkhsh
parent 89f8476110
commit c75cb9ad7a
1 changed files with 3 additions and 2 deletions

View File

@ -50,7 +50,8 @@ keymap(const char *unused)
Display *dpy; Display *dpy;
XkbDescRec *desc; XkbDescRec *desc;
XkbStateRec state; XkbStateRec state;
char *symbols, *layout; char *symbols;
const char *layout;
layout = NULL; layout = NULL;
@ -74,7 +75,7 @@ keymap(const char *unused)
warn("XGetAtomName: Failed to get atom name"); warn("XGetAtomName: Failed to get atom name");
goto end; goto end;
} }
layout = (char *)bprintf("%s", get_layout(symbols, state.group)); layout = bprintf("%s", get_layout(symbols, state.group));
XFree(symbols); XFree(symbols);
end: end:
XkbFreeKeyboard(desc, XkbSymbolsNameMask, 1); XkbFreeKeyboard(desc, XkbSymbolsNameMask, 1);