- remove redundant range check for buttons in conf_bind_mouse.

- make conf_bind_kbd return error on non-matches to match what
   conf_bind_mouse does.
 - rename some variables while here for clarity.
 - constify bind and cmd.

from Tiago Cunha.
This commit is contained in:
okan
2014-01-20 19:06:04 +00:00
parent 720b5452aa
commit 7263fb4c84
3 changed files with 59 additions and 62 deletions

View File

@@ -155,7 +155,12 @@ main : FONTNAME STRING {
free($2);
}
| BIND STRING string {
conf_bind_kbd(conf, $2, $3);
if (!conf_bind_kbd(conf, $2, $3)) {
yyerror("invalid bind: %s %s", $2, $3);
free($2);
free($3);
YYERROR;
}
free($2);
free($3);
}