diff options
author | Daniel Stone <daniel@fooishbar.org> | 2012-08-03 02:37:09 +0200 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2012-08-08 13:30:24 +0200 |
commit | 055b30349310060ac1ae7b0320445bf85bcfae5d (patch) | |
tree | f8fc2a63cd843f81e5603cbd1420bb0912d8f116 /test/interactive.c | |
parent | 3f0169424f81cb514460c1103c1bc9485568dfd0 (diff) |
tests: Fix uninitialised-use-of-'ret' warning
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'test/interactive.c')
-rw-r--r-- | test/interactive.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/interactive.c b/test/interactive.c index 2941c42..6bd6a4f 100644 --- a/test/interactive.c +++ b/test/interactive.c @@ -470,11 +470,13 @@ main(int argc, char *argv[]) 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) { @@ -499,9 +501,8 @@ main(int argc, char *argv[]) system("stty -echo"); ret = loop(kbds); - if (ret) { + if (ret) goto err_stty; - } err_stty: system("stty echo"); |