diff options
author | okan <okan> | 2014-01-20 19:06:04 +0000 |
---|---|---|
committer | okan <okan> | 2014-01-20 19:06:04 +0000 |
commit | 7263fb4c8457631a921c20a93bb339dfe638bb34 (patch) | |
tree | 0f1a5620e88d120daf830ba2e1e4368e3c0700b5 /parse.y | |
parent | 720b5452aa13bf27740a2b923617188fde8814ed (diff) | |
download | cwm-7263fb4c8457631a921c20a93bb339dfe638bb34.tar.gz cwm-7263fb4c8457631a921c20a93bb339dfe638bb34.tar.xz cwm-7263fb4c8457631a921c20a93bb339dfe638bb34.zip |
- 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.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/parse.y b/parse.y index f347f85..96f0b22 100644 --- a/parse.y +++ b/parse.y @@ -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); } |