summaryrefslogtreecommitdiffstats
path: root/input/input.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-02 19:59:35 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-02 19:59:35 +0000
commit48c9fd284d0c67c040d840f1701bf8d6b3f91bba (patch)
tree7d20d9319c00c72f7cd8a22e27b03412f193eb83 /input/input.c
parentc2a0aab9239c2b9ea9c763779572a3f0eb47dab8 (diff)
downloadmpv-48c9fd284d0c67c040d840f1701bf8d6b3f91bba.tar.bz2
mpv-48c9fd284d0c67c040d840f1701bf8d6b3f91bba.tar.xz
Simplify: 1 > 0 seems to be a rather safe assumption to make ;-)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21448 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'input/input.c')
-rw-r--r--input/input.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/input/input.c b/input/input.c
index e37015cd9f..9f95d723f4 100644
--- a/input/input.c
+++ b/input/input.c
@@ -886,8 +886,8 @@ static char*
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 @@ mp_input_find_bind_for_key(mp_cmd_bind_t* binds, int n,int* keys) {
}
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;
}