aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2014-12-02 15:32:49 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 11:40:29 +0100
commit7e5865248225e0934bef6c60e474018f28075cea (patch)
tree2f050c9799b8f22da8ba97fcecf91f9087a11cb2 /lib/asn1/src
parent2616db481ed47e09a73a1195ed12bcaa9fda9796 (diff)
downloadotp-7e5865248225e0934bef6c60e474018f28075cea.tar.gz
otp-7e5865248225e0934bef6c60e474018f28075cea.tar.bz2
otp-7e5865248225e0934bef6c60e474018f28075cea.zip
Remove code duplication
Diffstat (limited to 'lib/asn1/src')
-rw-r--r--lib/asn1/src/asn1ct_check.erl19
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index cfd31474da..4ff8a414fb 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -3058,23 +3058,8 @@ instantiate_ptype(S,Ptypedef,ParaList) ->
%% NewS = S#state{type=NewType,parameters=MatchedArgs,abscomppath=[]},
check_type(NewS, Ptypedef#ptypedef{typespec=NewType}, NewType).
-get_datastr_name(#typedef{name=N}) ->
- N;
-get_datastr_name(#classdef{name=N}) ->
- N;
-get_datastr_name(#valuedef{name=N}) ->
- N;
-get_datastr_name(#ptypedef{name=N}) ->
- N;
-get_datastr_name(#pvaluedef{name=N}) ->
- N;
-get_datastr_name(#pvaluesetdef{name=N}) ->
- N;
-get_datastr_name(#pobjectdef{name=N}) ->
- N;
-get_datastr_name(#pobjectsetdef{name=N}) ->
- N.
-
+get_datastr_name(Type) ->
+ asn1ct:get_name_of_def(Type).
get_pt_args(#ptypedef{args=Args}) ->
Args;