diff options
| -rw-r--r-- | xkbcat.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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. |
