aboutsummaryrefslogtreecommitdiffstats
path: root/packet-tftp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-12-24 10:48:13 +0000
committerGuy Harris <guy@alum.mit.edu>2003-12-24 10:48:13 +0000
commit274520160aa68cfeaf752bc8e36fad3cdf5f4196 (patch)
tree105c6bfebbe41b534a38aa473ad42f8089479101 /packet-tftp.c
parent3f05338503e333053af8d2336a4e9d52656a732b (diff)
Don't display TFTP data if there isn't any to display.
svn path=/trunk/; revision=9439
Diffstat (limited to 'packet-tftp.c')
-rw-r--r--packet-tftp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/packet-tftp.c b/packet-tftp.c
index 493df31a96..e559e47a4c 100644
--- a/packet-tftp.c
+++ b/packet-tftp.c
@@ -5,7 +5,7 @@
* Craig Newell <CraigN@cheque.uq.edu.au>
* RFC2347 TFTP Option Extension
*
- * $Id: packet-tftp.c,v 1.40 2002/08/28 21:00:36 jmayer Exp $
+ * $Id: packet-tftp.c,v 1.41 2003/12/24 10:48:13 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -218,9 +218,11 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
(bytes < 512)?" (last)":"" );
}
- if (tree) {
- proto_tree_add_text(tftp_tree, tvb, offset, -1,
+ if (bytes != 0) {
+ if (tree) {
+ proto_tree_add_text(tftp_tree, tvb, offset, -1,
"Data (%d bytes)", bytes);
+ }
}
break;