Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
a964e033
Commit
a964e033
authored
Mar 26, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed more unnecessary checks
parent
fa9bb6dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
12 deletions
+14
-12
libasn1parser/asn1p_y.c
libasn1parser/asn1p_y.c
+9
-7
libasn1parser/asn1p_y.h
libasn1parser/asn1p_y.h
+1
-1
libasn1parser/asn1p_y.y
libasn1parser/asn1p_y.y
+4
-4
No files found.
libasn1parser/asn1p_y.c
View file @
a964e033
...
@@ -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
);
...
...
libasn1parser/asn1p_y.h
View file @
a964e033
...
@@ -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
...
...
libasn1parser/asn1p_y.y
View file @
a964e033
...
@@ -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);
}
}
;
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment