aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2012-04-30 23:03:51 +0000
committerGuy Harris <guy@alum.mit.edu>2012-04-30 23:03:51 +0000
commit66ee0608c7a072ecfe3e83c1a3fa07f4133e2673 (patch)
treee0f19197e718b88344d3909f27ac08fcf90b4c7b /plugins
parent3b6b521c28e46a9a87c52338ef3d2eaa2a93810c (diff)
The message length isn't needed in cmd_sched_rep() - it's just the
containing packet length, so if we go past it, we'll get an exception thrown. Get rid of it. The answer to "Should msglen be returned instead of offset?" is "no" - the command dissectors return the new offset. Get rid of an unused - and unnecessary - variable. svn path=/trunk/; revision=42367
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gryphon/packet-gryphon.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/plugins/gryphon/packet-gryphon.c b/plugins/gryphon/packet-gryphon.c
index 6a398b8023..6dfe7899fa 100644
--- a/plugins/gryphon/packet-gryphon.c
+++ b/plugins/gryphon/packet-gryphon.c
@@ -1385,12 +1385,9 @@ cmd_sched(tvbuff_t *tvb, int offset, proto_tree *pt)
static int
cmd_sched_rep(tvbuff_t *tvb, int offset, proto_tree *pt)
{
- int msglen;
- int save_offset;
unsigned int x;
const char *type;
- msglen = tvb_reported_length_remaining(tvb, offset);
x = tvb_get_ntohl(tvb, offset);
if (x & 0x80000000)
type = "Critical";
@@ -1398,16 +1395,11 @@ cmd_sched_rep(tvbuff_t *tvb, int offset, proto_tree *pt)
type = "Normal";
proto_tree_add_text(pt, tvb, offset, 4, "%s schedule ID: %u", type, x);
offset += 4;
- msglen -= 4;
x= tvb_get_guint8(tvb, offset);
proto_tree_add_text(pt, tvb, offset, 1, "Message index: %d", x);
proto_tree_add_text(pt, tvb, offset + 1, 3, "reserved");
offset += 4;
- msglen -= 4;
- save_offset = offset;
offset = decode_data(tvb, offset, pt);
- /* XXX - Added in r8607 but unused. Should msglen be returned instead of offset? */
- /* msglen -= offset - save_offset; */
return offset;
}