summary refs log tree commit diff
path: root/parse.y
diff options
context:
space:
mode:
authorokan <okan>2014-01-20 19:06:04 +0000
committerokan <okan>2014-01-20 19:06:04 +0000
commit7263fb4c8457631a921c20a93bb339dfe638bb34 (patch)
tree0f1a5620e88d120daf830ba2e1e4368e3c0700b5 /parse.y
parent720b5452aa13bf27740a2b923617188fde8814ed (diff)
downloadcwm-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.y7
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);
 		}