From 6da9e95f7381fa27bc9c66c9840b11adde778618 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 7 Apr 2011 16:13:01 -0700 Subject: drivers/tty/vt/vt_ioctl.c: repair insane ?: expression Cc: Arthur Taylor Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/tty/vt/vt_ioctl.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'drivers/tty') diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index e71477a..01ccd9e 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c @@ -698,11 +698,23 @@ int vt_ioctl(struct tty_struct *tty, break; case KDGKBMODE: - uival = ((kbd->kbdmode == VC_RAW) ? K_RAW : - (kbd->kbdmode == VC_MEDIUMRAW) ? K_MEDIUMRAW : - (kbd->kbdmode == VC_UNICODE) ? K_UNICODE : - (kbd->kbdmode == VC_OFF) ? K_OFF : - K_XLATE); + switch (kbd->kbdmode) { + case VC_RAW: + uival = K_RAW; + break; + case VC_MEDIUMRAW: + uival = K_MEDIUMRAW; + break; + case VC_UNICODE: + uival = K_UNICODE; + break; + case VC_OFF: + uival = K_OFF; + break; + default: + uival = K_XLATE; + break; + } goto setint; /* this could be folded into KDSKBMODE, but for compatibility -- cgit v1.1