diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2008-07-09 13:56:11 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2008-07-09 13:56:11 +0000 |
commit | 845351c44038f6476c8452e0d9823e8bc1014dc5 (patch) | |
tree | 189d784a02aaf397d457d246fd3d33e8c5f55b11 /gnu/usr.bin | |
parent | 952ab311ebdd4193955b86ce06964c20021f96bc (diff) |
Incorporate Otto's yacc skeleton fix.
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/perl/perly.c | 5 | ||||
-rw-r--r-- | gnu/usr.bin/perl/x2p/a2p.c | 15 |
2 files changed, 16 insertions, 4 deletions
diff --git a/gnu/usr.bin/perl/perly.c b/gnu/usr.bin/perl/perly.c index 378b9667682..0e8e9cb1e77 100644 --- a/gnu/usr.bin/perl/perly.c +++ b/gnu/usr.bin/perl/perly.c @@ -1596,7 +1596,10 @@ yyreduce: yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; - yyval = yyvsp[1-yym]; + if (yym) + yyval = yyvsp[1-yym]; + else + memset(&yyval, 0, sizeof(yyval)); switch (yyn) { case 1: diff --git a/gnu/usr.bin/perl/x2p/a2p.c b/gnu/usr.bin/perl/x2p/a2p.c index 1098b1e6867..27858e71352 100644 --- a/gnu/usr.bin/perl/x2p/a2p.c +++ b/gnu/usr.bin/perl/x2p/a2p.c @@ -10,7 +10,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; extern int yyparse(void); #define YYPREFIX "yy" #line 2 "a2p.y" -/* $RCSfile: a2p.y,v $$Revision: 4.1 $$Date: 92/08/07 18:29:12 $ +/* $RCSfile: a2p.c,v $$Revision: 1.9 $$Date: 2008/07/09 13:54:44 $ * * Copyright (C) 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, * by Larry Wall and others @@ -18,7 +18,13 @@ extern int yyparse(void); * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * - * $Log: a2p.y,v $ + * $Log: a2p.c,v $ + * Revision 1.9 2008/07/09 13:54:44 millert + * Incorporate Otto's yacc skeleton fix. + * + * Revision 1.8 2006/03/28 19:23:15 millert + * merge in perl 5.8.8 + * */ #include "INTERN.h" @@ -2312,7 +2318,10 @@ yyreduce: YYPREFIX, yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; - yyval = yyvsp[1-yym]; + if (yym) + yyval = yyvsp[1-yym]; + else + memset(&yyval, 0, sizeof(yyval)); switch (yyn) { case 1: |