aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-10-12 08:11:46 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-10-12 08:11:46 +0000
commit98862b9f9a0d45a9980153b867a08452fac3a0f1 (patch)
treec6b53dd9302d6cdd4e85905af875e6c8bcfc7fde /tools
parentfcb6de56a7456faf887e51aebca85b4ddf25a36c (diff)
From Tomas Kukosa:
- avoid assignemnt to None which is deprecated in Python 2.3 - fix bug when one field is used both with and without implicit tag git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12277 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tools')
-rw-r--r--tools/asn2eth.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/asn2eth.py b/tools/asn2eth.py
index 4d10469acc..ffb0cd5b22 100644
--- a/tools/asn2eth.py
+++ b/tools/asn2eth.py
@@ -930,6 +930,7 @@ class EthCtx:
x = {False : False}
x = x.values()
x.sort()
+ out = ''
for i in x:
if (i):
postfix = '_impl'
@@ -940,10 +941,10 @@ class EthCtx:
if (self.Ber()):
if (i): postfix = '_impl'; impl = 'TRUE'
else: postfix = ''; impl = 'FALSE'
- out = 'static int dissect_'+f+postfix+'(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {\n'
+ out += 'static int dissect_'+f+postfix+'(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {\n'
par=((impl, 'tvb', 'offset', 'pinfo', 'tree', self.eth_hf[f]['fullname']),)
else:
- out = 'static int dissect_'+f+'(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {\n'
+ out += 'static int dissect_'+f+'(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) {\n'
par=(('tvb', 'offset', 'pinfo', 'tree', self.eth_hf[f]['fullname']),)
out += self.eth_fn_call('dissect_%s_%s' % (self.eth_type[t]['proto'], t), ret='return',
par=par)
@@ -2419,13 +2420,13 @@ class EnumeratedType (Type):
def eth_type_vals(self, proto, tname, ectx):
out = '\n'
- (vals, None) = self.get_vals_maxv(proto, tname, ectx)
+ (vals, xxxx) = self.get_vals_maxv(proto, tname, ectx)
out += ectx.eth_vals(tname, vals)
return out
def eth_type_fn(self, proto, tname, ectx):
fname = ectx.eth_type[tname]['ref'][0]
- (None, maxv) = self.get_vals_maxv(proto, tname, ectx)
+ (xxxx, maxv) = self.get_vals_maxv(proto, tname, ectx)
maxv = str(maxv)
minv = '0'
out = '\n'