aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorokan2014-01-20 19:06:04 +0000
committerokan2014-01-20 19:06:04 +0000
commitbc4622e632abd877c52d5baa8359e834325a4f23 (patch)
treeb37ca7ac8f01fb72ba177f4c753d2b5f1f10ce48 /parse.y
parent749175e23624a43a35824edada4545a6115dd4d1 (diff)
downloadcwm-bc4622e632abd877c52d5baa8359e834325a4f23.tar.gz
- 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 '')
-rw-r--r--parse.y9
1 files changed, 7 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index c113744..6700a01 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.49 2013/12/13 14:40:52 okan Exp $ */
+/* $OpenBSD: parse.y,v 1.50 2014/01/20 19:06:04 okan Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -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);
}