Mercurial > mplayer.hg
changeset 21432:6f2116ad422a
Simplify: 1 > 0 seems to be a rather safe assumption to make ;-)
author | reimar |
---|---|
date | Sat, 02 Dec 2006 19:59:35 +0000 |
parents | a8e1337ae9db |
children | 51975bc20a27 |
files | input/input.c |
diffstat | 1 files changed, 1 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/input/input.c Sat Dec 02 18:51:01 2006 +0000 +++ b/input/input.c Sat Dec 02 19:59:35 2006 +0000 @@ -886,8 +886,8 @@ mp_input_find_bind_for_key(mp_cmd_bind_t* binds, int n,int* keys) { int j; + if (n <= 0) return NULL; for(j = 0; binds[j].cmd != NULL; j++) { - if(n > 0) { int found = 1,s; for(s = 0; s < n && binds[j].input[s] != 0; s++) { if(binds[j].input[s] != keys[s]) { @@ -897,12 +897,6 @@ } if(found && binds[j].input[s] == 0 && s == n) break; - else - continue; - } else if(n == 1){ - if(binds[j].input[0] == keys[0] && binds[j].input[1] == 0) - break; - } } return binds[j].cmd; }