Commit a964e033 authored by Lev Walkin's avatar Lev Walkin

removed more unnecessary checks

parent fa9bb6dc
...@@ -430,7 +430,7 @@ typedef union YYSTYPE ...@@ -430,7 +430,7 @@ typedef union YYSTYPE
} tv_nametag; } tv_nametag;
} }
/* Line 193 of yacc.c. */ /* Line 193 of yacc.c. */
#line 434 "y.tab.c" #line 434 "asn1p_y.c"
YYSTYPE; YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
...@@ -443,7 +443,7 @@ typedef union YYSTYPE ...@@ -443,7 +443,7 @@ typedef union YYSTYPE
/* Line 216 of yacc.c. */ /* Line 216 of yacc.c. */
#line 447 "y.tab.c" #line 447 "asn1p_y.c"
#ifdef short #ifdef short
# undef short # undef short
...@@ -2318,7 +2318,8 @@ yyreduce: ...@@ -2318,7 +2318,8 @@ yyreduce:
{ {
(yyval.a_oid) = asn1p_oid_new(); (yyval.a_oid) = asn1p_oid_new();
asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc)); asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(1) - (1)].a_oid_arc));
free((yyvsp[(1) - (1)].a_oid_arc).name); if((yyvsp[(1) - (1)].a_oid_arc).name)
free((yyvsp[(1) - (1)].a_oid_arc).name);
} }
break; break;
...@@ -2327,7 +2328,8 @@ yyreduce: ...@@ -2327,7 +2328,8 @@ yyreduce:
{ {
(yyval.a_oid) = (yyvsp[(1) - (2)].a_oid); (yyval.a_oid) = (yyvsp[(1) - (2)].a_oid);
asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc)); asn1p_oid_add_arc((yyval.a_oid), &(yyvsp[(2) - (2)].a_oid_arc));
free((yyvsp[(2) - (2)].a_oid_arc).name); if((yyvsp[(2) - (2)].a_oid_arc).name)
free((yyvsp[(2) - (2)].a_oid_arc).name);
} }
break; break;
...@@ -2823,7 +2825,7 @@ yyreduce: ...@@ -2823,7 +2825,7 @@ yyreduce:
checkmem((yyval.a_plist)); checkmem((yyval.a_plist));
ret = asn1p_paramlist_add_param((yyval.a_plist), (yyvsp[(1) - (1)].a_parg).governor, (yyvsp[(1) - (1)].a_parg).argument); ret = asn1p_paramlist_add_param((yyval.a_plist), (yyvsp[(1) - (1)].a_parg).governor, (yyvsp[(1) - (1)].a_parg).argument);
checkmem(ret == 0); checkmem(ret == 0);
if((yyvsp[(1) - (1)].a_parg).governor) asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor); asn1p_ref_free((yyvsp[(1) - (1)].a_parg).governor);
free((yyvsp[(1) - (1)].a_parg).argument); free((yyvsp[(1) - (1)].a_parg).argument);
} }
break; break;
...@@ -2835,7 +2837,7 @@ yyreduce: ...@@ -2835,7 +2837,7 @@ yyreduce:
(yyval.a_plist) = (yyvsp[(1) - (3)].a_plist); (yyval.a_plist) = (yyvsp[(1) - (3)].a_plist);
ret = asn1p_paramlist_add_param((yyval.a_plist), (yyvsp[(3) - (3)].a_parg).governor, (yyvsp[(3) - (3)].a_parg).argument); ret = asn1p_paramlist_add_param((yyval.a_plist), (yyvsp[(3) - (3)].a_parg).governor, (yyvsp[(3) - (3)].a_parg).argument);
checkmem(ret == 0); checkmem(ret == 0);
if((yyvsp[(3) - (3)].a_parg).governor) asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor); asn1p_ref_free((yyvsp[(3) - (3)].a_parg).governor);
free((yyvsp[(3) - (3)].a_parg).argument); free((yyvsp[(3) - (3)].a_parg).argument);
} }
break; break;
...@@ -4793,7 +4795,7 @@ yyreduce: ...@@ -4793,7 +4795,7 @@ yyreduce:
/* Line 1267 of yacc.c. */ /* Line 1267 of yacc.c. */
#line 4799 "y.tab.c" #line 4799 "asn1p_y.c"
default: break; default: break;
} }
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
......
...@@ -294,7 +294,7 @@ typedef union YYSTYPE ...@@ -294,7 +294,7 @@ typedef union YYSTYPE
} tv_nametag; } tv_nametag;
} }
/* Line 1529 of yacc.c. */ /* Line 1529 of yacc.c. */
#line 298 "y.tab.h" #line 298 "asn1p_y.h"
YYSTYPE; YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
......
...@@ -850,16 +850,16 @@ ParameterArgumentList: ...@@ -850,16 +850,16 @@ ParameterArgumentList:
checkmem($$); checkmem($$);
ret = asn1p_paramlist_add_param($$, $1.governor, $1.argument); ret = asn1p_paramlist_add_param($$, $1.governor, $1.argument);
checkmem(ret == 0); checkmem(ret == 0);
if($1.governor) asn1p_ref_free($1.governor); asn1p_ref_free($1.governor);
if($1.argument) free($1.argument); free($1.argument);
} }
| ParameterArgumentList ',' ParameterArgumentName { | ParameterArgumentList ',' ParameterArgumentName {
int ret; int ret;
$$ = $1; $$ = $1;
ret = asn1p_paramlist_add_param($$, $3.governor, $3.argument); ret = asn1p_paramlist_add_param($$, $3.governor, $3.argument);
checkmem(ret == 0); checkmem(ret == 0);
if($3.governor) asn1p_ref_free($3.governor); asn1p_ref_free($3.governor);
if($3.argument) free($3.argument); free($3.argument);
} }
; ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment