summaryrefslogtreecommitdiff
path: root/app/xkbcomp/xkbparse.y
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2008-04-20 16:32:07 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2008-04-20 16:32:07 +0000
commit9b8aded9a19c91688b00e7bf46b0d1e750e6a470 (patch)
treee3ddb92d209bc7900db61285b0e9ca6ea0eb5c08 /app/xkbcomp/xkbparse.y
parent59965ed6bc7f64f2121f10508622f5d58c8a8c1b (diff)
Update to xkbcomp 1.0.4
Diffstat (limited to 'app/xkbcomp/xkbparse.y')
-rw-r--r--app/xkbcomp/xkbparse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/xkbcomp/xkbparse.y b/app/xkbcomp/xkbparse.y
index 662325b2e..52afa2b80 100644
--- a/app/xkbcomp/xkbparse.y
+++ b/app/xkbcomp/xkbparse.y
@@ -705,7 +705,8 @@ Terminal : String
{
ExprDef *expr;
expr= ExprCreate(ExprValue,TypeKeyName);
- memcpy(expr->value.keyName,$1,4);
+ memset(expr->value.keyName,0,5);
+ strncpy(expr->value.keyName,$1,4);
free($1);
$$= expr;
}
@@ -778,7 +779,7 @@ MapName : STRING { $$= scanStr; scanStr= NULL; }
;
%%
void
-yyerror(char *s)
+yyerror(const char *s)
{
if (warningLevel>0) {
(void)fprintf(stderr,"%s: line %d of %s\n",s,lineNum,