diff options
author | Tomas Kukosa <tomas.kukosa@siemens.com> | 2006-05-31 13:38:10 +0000 |
---|---|---|
committer | Tomas Kukosa <tomas.kukosa@siemens.com> | 2006-05-31 13:38:10 +0000 |
commit | 34e1acfc0843cb9a47c28a11a2904a8a7a1b8368 (patch) | |
tree | 8deaac3db8d0dd263261ecca7b206732e86ed1c9 /epan | |
parent | 697974ae8d8bda44de29b8cbc20c6d0bb2cab5be (diff) | |
download | wireshark-34e1acfc0843cb9a47c28a11a2904a8a7a1b8368.tar.gz |
get rid of few warnings in packet-per.c
svn path=/trunk/; revision=18264
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-per.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index 9e9ff8c8be..6446941072 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -800,7 +800,7 @@ DEBUG_ENTRY("dissect_per_constrained_integer"); offset=dissect_per_boolean(tvb, offset, actx, tree, hf_per_extension_present_bit, &extension_present); if (!display_internal_per_fields) PROTO_ITEM_SET_HIDDEN(actx->created_item); if(extension_present){ - offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, value); + offset = dissect_per_integer(tvb, offset, actx, tree, hf_index, (gint32*)value); return offset; } } @@ -1537,6 +1537,8 @@ DEBUG_ENTRY("dissect_per_octet_string"); tvb_set_child_real_data_tvbuff(tvb,out_tvb); add_new_data_source(actx->pinfo, out_tvb, "PER unaligned decoded OCTET STRING"); } + } else { + val_start = offset>>3; } val_length = length; } @@ -1562,11 +1564,10 @@ DEBUG_ENTRY("dissect_per_octet_string"); } } } + if (value_tvb) - if (out_tvb) - *value_tvb = out_tvb; - else - *value_tvb = tvb_new_subset(tvb, val_start, val_length, val_length); + *value_tvb = (out_tvb) ? out_tvb : tvb_new_subset(tvb, val_start, val_length, val_length); + return offset; } |