summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--xkbcat.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xkbcat.c b/xkbcat.c
index b7be2aa..6771003 100644
--- a/xkbcat.c
+++ b/xkbcat.c
@@ -140,22 +140,22 @@ int main(int argc, char *argv[]) {
// or numeric keypad keys.)
if (NoSymbol == s) {
if (group == 0)
- continue;
+ goto end;
else {
s = XkbKeycodeToKeysym(disp, ev->detail, 0 /* base group */,
0 /*shift level*/);
if (NoSymbol == s)
- continue;
+ goto end;
}
}
if ((s >= XK_A && s <= XK_Z) || (s >= XK_a && s <= XK_z)) {
- continue;
+ goto end;
}
char *str = XKeysymToString(s);
if (NULL == str)
- continue;
+ goto end;
// Output line
if (printKeyUps)
@@ -164,6 +164,8 @@ int main(int argc, char *argv[]) {
fflush(stdout);
}
}
+
+ end:
// Release memory associated with event data
XFreeEventData(disp, cookie);
} else { // No extra data to release; `event` contains everything.