diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-09 16:22:53 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-09 16:22:53 +0000 |
commit | 398f94dd24cda521a322cbf0d55e4f6bc9ac7e25 (patch) | |
tree | d87a875b3293df2697e9decca5f3e87b5d264f2b /epan/tvbuff.c | |
parent | df2c82e64298f75480c130998d20f722f3b39b04 (diff) | |
download | wireshark-398f94dd24cda521a322cbf0d55e4f6bc9ac7e25.tar.gz |
tvb subset: move setting tvb->ds_tvb to tvb_new_with_subset()
svn path=/trunk/; revision=50464
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r-- | epan/tvbuff.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c index 3d0f57fcf7..97e503a55b 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -424,6 +424,12 @@ tvb_new_with_subset(tvbuff_t *backing, const gint reported_length, tvb->real_data = backing->real_data + tvb->tvbuffs.subset.offset; } + /* + * The top-level data source of this tvbuff is the top-level + * data source of its parent. + */ + tvb->ds_tvb = backing->ds_tvb; + return tvb; } @@ -445,12 +451,6 @@ tvb_new_subset(tvbuff_t *backing, const gint backing_offset, const gint backing_ tvb = tvb_new_with_subset(backing, reported_length, subset_tvb_offset, subset_tvb_length); - /* - * The top-level data source of this tvbuff is the top-level - * data source of its parent. - */ - tvb->ds_tvb = backing->ds_tvb; - return tvb; } @@ -481,12 +481,6 @@ tvb_new_subset_length(tvbuff_t *backing, const gint backing_offset, const gint b tvb = tvb_new_with_subset(backing, backing_length, subset_tvb_offset, subset_tvb_length); - /* - * The top-level data source of this tvbuff is the top-level - * data source of its parent. - */ - tvb->ds_tvb = backing->ds_tvb; - return tvb; } @@ -504,12 +498,6 @@ tvb_new_subset_remaining(tvbuff_t *backing, const gint backing_offset) tvb = tvb_new_with_subset(backing, -1 /* reported_length */, subset_tvb_offset, subset_tvb_length); - /* - * The top-level data source of this tvbuff is the top-level - * data source of its parent. - */ - tvb->ds_tvb = backing->ds_tvb; - return tvb; } |