diff options
author | Tomas Kukosa <tomas.kukosa@siemens.com> | 2008-01-28 17:34:38 +0000 |
---|---|---|
committer | Tomas Kukosa <tomas.kukosa@siemens.com> | 2008-01-28 17:34:38 +0000 |
commit | b2b6786670d5ebf65913dbe22b548cd2be917daa (patch) | |
tree | e49e915e709d083ca2d41b6d72430dd3ecad974b /tools | |
parent | e5aa8c3f525bd7cf6e682d2d8971ed8c96f77043 (diff) |
cleanup code (remove some collapsed conditions)
svn path=/trunk/; revision=24215
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/asn2wrs.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/tools/asn2wrs.py b/tools/asn2wrs.py index 058a38efe3..cf2020aba5 100755 --- a/tools/asn2wrs.py +++ b/tools/asn2wrs.py @@ -3744,10 +3744,7 @@ class SeqType (SqType): def eth_type_default_table(self, ectx, tname): #print "eth_type_default_table(tname='%s')" % (tname) fname = ectx.eth_type[tname]['ref'][0] - if (ectx.Ber()): - table = "static const %(ER)s_sequence_t %(TABLE)s[] = {\n" - else: - table = "static const %(ER)s_sequence_t %(TABLE)s[] = {\n" + table = "static const %(ER)s_sequence_t %(TABLE)s[] = {\n" if hasattr(self, 'ext_list'): ext = 'ASN1_EXTENSION_ROOT' else: @@ -3778,10 +3775,7 @@ class SeqOfType (SqType): f = fname + '/' + self.val.name else: f = fname + '/' + '_item' - if (ectx.Ber()): - table = "static const %(ER)s_sequence_t %(TABLE)s[1] = {\n" - else: - table = "static const %(ER)s_sequence_t %(TABLE)s[1] = {\n" + table = "static const %(ER)s_sequence_t %(TABLE)s[1] = {\n" table += self.out_item(f, self.val, False, 'ASN1_NO_EXTENSIONS', ectx) table += "};\n" return table @@ -4243,10 +4237,7 @@ class ChoiceType (Type): #print "eth_type_default_table(tname='%s')" % (tname) fname = ectx.eth_type[tname]['ref'][0] tagval = self.detect_tagval(ectx) - if (ectx.Ber()): - table = "static const %(ER)s_choice_t %(TABLE)s[] = {\n" - else: - table = "static const %(ER)s_choice_t %(TABLE)s[] = {\n" + table = "static const %(ER)s_choice_t %(TABLE)s[] = {\n" cnt = 0 if hasattr(self, 'ext_list'): ext = 'ASN1_EXTENSION_ROOT' |