From c54416ae163702858ce97808753af16c8c9b5921 Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 20 Jun 2009 00:55:41 +0000 Subject: compact a bit by condensing a few if-else's; from Thomas Pfaff "go on then" oga@ --- input.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'input.c') diff --git a/input.c b/input.c index cb08847..6471452 100644 --- a/input.c +++ b/input.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: input.c,v 1.7 2008/07/11 14:21:28 okan Exp $ + * $Id: input.c,v 1.8 2009/06/20 00:55:42 okan Exp $ */ #include "headers.h" @@ -29,10 +29,7 @@ input_keycodetrans(KeyCode kc, u_int state, enum ctltype *ctl, char *chr) *ctl = CTL_NONE; *chr = '\0'; - if (state & ShiftMask) - ks = XKeycodeToKeysym(X_Dpy, kc, 1); - else - ks = XKeycodeToKeysym(X_Dpy, kc, 0); + ks = XKeycodeToKeysym(X_Dpy, kc, (state & ShiftMask) ? 1 : 0); /* Look for control characters. */ switch (ks) { -- cgit v1.2.3-2-gb3c3