aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dnp.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2007-10-23 05:50:00 +0000
committerAnders Broman <anders.broman@ericsson.com>2007-10-23 05:50:00 +0000
commit1950ffc2141ffdb7a0b8ec8291b0bf99ac12d9d6 (patch)
treea3358964f8621efae38bb4df4903f6b9f3f46ea5 /epan/dissectors/packet-dnp.c
parente78cce5fbd7a11b0d3122b6d64968c15ea3106f8 (diff)
Apply the small performance enhancment patches for:
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster. Replace - col_append_fstr() with faster col_append_str() - col_add_str() with col_set_str() when it's safe svn path=/trunk/; revision=23252
Diffstat (limited to 'epan/dissectors/packet-dnp.c')
-rw-r--r--epan/dissectors/packet-dnp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dnp.c b/epan/dissectors/packet-dnp.c
index 84ba32cf92..57203760b4 100644
--- a/epan/dissectors/packet-dnp.c
+++ b/epan/dissectors/packet-dnp.c
@@ -2547,7 +2547,7 @@ get_dnp3_message_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset)
static int
dissect_dnp3_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- gint length = tvb_length_remaining(tvb, 0);
+ gint length = tvb_length(tvb);
/* Check for a dnp packet. It should begin with 0x0564 */
if(length < DNP_HDR_LEN || tvb_get_ntohs(tvb, 0) != 0x0564) {
@@ -2564,7 +2564,7 @@ dissect_dnp3_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static int
dissect_dnp3_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
- gint length = tvb_length_remaining(tvb, 0);
+ gint length = tvb_length(tvb);
/* Check for a dnp packet. It should begin with 0x0564 */
if(length < DNP_HDR_LEN || tvb_get_ntohs(tvb, 0) != 0x0564) {
/* Not a DNP 3.0 packet, just happened to use the same port */