aboutsummaryrefslogtreecommitdiffstats
path: root/reassemble.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-06-17 01:12:13 +0000
committerGuy Harris <guy@alum.mit.edu>2002-06-17 01:12:13 +0000
commit88e6717f5172cbbfc423c74f8d2737f59cdc8268 (patch)
tree48bec4890787e6eb9f1dbba7b08f94939e18e297 /reassemble.c
parent5cb1f7c75c63e35abc9c94bee88481827ff35812 (diff)
Don't check for a short frame until we care whether the frame is short;
that lets us get rid of a variable. svn path=/trunk/; revision=5689
Diffstat (limited to 'reassemble.c')
-rw-r--r--reassemble.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/reassemble.c b/reassemble.c
index c2ba0fdda7..bcf7baf4f7 100644
--- a/reassemble.c
+++ b/reassemble.c
@@ -1,7 +1,7 @@
/* reassemble.c
* Routines for {fragment,segment} reassembly
*
- * $Id: reassemble.c,v 1.21 2002/06/07 10:17:21 guy Exp $
+ * $Id: reassemble.c,v 1.22 2002/06/17 01:12:13 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -984,7 +984,6 @@ fragment_add_seq_check(tvbuff_t *tvb, int offset, packet_info *pinfo,
fragment_key key, *new_key, *old_key;
gpointer orig_key, value;
fragment_data *fd_head;
- gboolean short_frame;
/*
* Have we already seen this frame?
@@ -993,8 +992,6 @@ fragment_add_seq_check(tvbuff_t *tvb, int offset, packet_info *pinfo,
if (pinfo->fd->flags.visited)
return g_hash_table_lookup(reassembled_table, pinfo->fd);
- short_frame = (tvb_reported_length(tvb) > tvb_length(tvb));
-
/* create key to search hash with */
key.src = pinfo->src;
key.dst = pinfo->dst;
@@ -1061,7 +1058,7 @@ fragment_add_seq_check(tvbuff_t *tvb, int offset, packet_info *pinfo,
* If "more_frags" isn't set, we get rid of the entry in the
* hash table for this reassembly, as we don't need it any more.
*/
- if (short_frame) {
+ if (tvb_reported_length(tvb) > tvb_length(tvb)) {
if (!more_frags) {
/*
* Remove this from the table of in-progress