From: Simon Tatham Date: Wed, 15 Feb 2017 05:21:13 +0000 (+0000) Subject: Remove a redundant ?: in the nethack_keypad code. X-Git-Tag: 0.68~19 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=54720b2c5a36648864d7bfc6547ef86168db1865;p=PuTTY.git Remove a redundant ?: in the nethack_keypad code. I think all of the cases in this switch must have originally said (shift_state ? 'this' : 'that'), and in all but the VK_NUMPAD5 case the two options were different, and I left VK_NUMPAD5 containing a redundant ?: just to make it line up in a nice table with the others. But now the others all have more options than that because I had to support Ctrl as well as Shift modifiers, so there's no reason to have that silly ?: lingering around (and it annoys Coverity). --- diff --git a/windows/window.c b/windows/window.c index fbbf4ce3..004eb4f8 100644 --- a/windows/window.c +++ b/windows/window.c @@ -4249,7 +4249,7 @@ static int TranslateKey(UINT message, WPARAM wParam, LPARAM lParam, *p++ = "hH\010\010"[shift_state & 3]; return p - output; case VK_NUMPAD5: - *p++ = shift_state ? '.' : '.'; + *p++ = '.'; return p - output; case VK_NUMPAD6: *p++ = "lL\014\014"[shift_state & 3];