Signed-off-by: Daniel Stone <daniel@fooishbar.org>
if (!file) {
fprintf(stderr, "Couldn't open file %s: %s\n",
keymap_path, strerror(errno));
+ ret = -1;
goto err_ctx;
}
keymap = xkb_map_new_from_file(ctx, file,
XKB_KEYMAP_FORMAT_TEXT_V1, 0);
- } else {
+ }
+ else {
keymap = xkb_map_new_from_names(ctx, &names, 0);
}
if (!keymap) {
system("stty -echo");
ret = loop(kbds);
- if (ret) {
+ if (ret)
goto err_stty;
- }
err_stty:
system("stty echo");