aboutsummaryrefslogtreecommitdiffstats
path: root/packet-v120.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>1999-12-12 23:08:20 +0000
committerGuy Harris <guy@alum.mit.edu>1999-12-12 23:08:20 +0000
commit104e56d68e85a5ecdcc71df7529a577b474e84bf (patch)
tree42a00be7dbc88d7f6edd0b8a719b7a5b621ade75 /packet-v120.c
parente15761f1a5ef63697fbdfbb03a4cecc8685d9e02 (diff)
downloadwireshark-104e56d68e85a5ecdcc71df7529a577b474e84bf.tar.gz
wireshark-104e56d68e85a5ecdcc71df7529a577b474e84bf.tar.bz2
wireshark-104e56d68e85a5ecdcc71df7529a577b474e84bf.zip
Set "v120len" regardless of whether "tree" is null or not; we use it
regardless of whether it's null or not. svn path=/trunk/; revision=1306
Diffstat (limited to 'packet-v120.c')
-rw-r--r--packet-v120.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/packet-v120.c b/packet-v120.c
index bc6c1bb0ef..f952f31570 100644
--- a/packet-v120.c
+++ b/packet-v120.c
@@ -2,7 +2,7 @@
* Routines for v120 frame disassembly
* Bert Driehuis <driehuis@playbeing.org>
*
- * $Id: packet-v120.c,v 1.1 1999/12/12 22:39:29 gram Exp $
+ * $Id: packet-v120.c,v 1.2 1999/12/12 23:08:20 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -91,11 +91,11 @@ dissect_v120(const u_char *pd, frame_data *fd, proto_tree *tree)
else
is_response = FALSE;
+ if (fd->pkt_len <= 5)
+ v120len = fd->pkt_len;
+ else
+ v120len = 5;
if (tree) {
- if (fd->pkt_len <= 5)
- v120len = fd->pkt_len;
- else
- v120len = 5;
ti = proto_tree_add_item_format(tree, proto_v120, 0, v120len, NULL,
"V.120");
v120_tree = proto_item_add_subtree(ti, ett_v120);