diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-23 17:23:51 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-07-23 17:23:51 +0000 |
commit | 761b763eaea8802313c0ad414c68509e29c901e8 (patch) | |
tree | 5c9a112ad750794d0c03af75125ed3b22c6ab346 | |
parent | 3808dfc909b3e776de9dd36024cf6956f0e124ad (diff) |
Move tvb_new_child_real_data() to tvbuff_real.c with some cleanup
svn path=/trunk/; revision=50843
-rw-r--r-- | epan/tvbuff.c | 11 | ||||
-rw-r--r-- | epan/tvbuff_real.c | 10 |
2 files changed, 10 insertions, 11 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c index 5e4bee8dcc..c95c2d6199 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -163,17 +163,6 @@ tvb_add_to_chain(tvbuff_t *parent, tvbuff_t *child) parent->next = child; } -tvbuff_t * -tvb_new_child_real_data(tvbuff_t *parent, const guint8* data, const guint length, const gint reported_length) -{ - tvbuff_t *tvb = tvb_new_real_data(data, length, reported_length); - if (tvb) { - tvb_set_child_real_data_tvbuff (parent, tvb); - } - - return tvb; -} - /* * Check whether that offset goes more than one byte past the * end of the buffer. diff --git a/epan/tvbuff_real.c b/epan/tvbuff_real.c index c1014eddbf..e6b94463eb 100644 --- a/epan/tvbuff_real.c +++ b/epan/tvbuff_real.c @@ -118,3 +118,13 @@ tvb_set_child_real_data_tvbuff(tvbuff_t *parent, tvbuff_t *child) DISSECTOR_ASSERT(child->ops == &tvb_real_ops); tvb_add_to_chain(parent, child); } + +tvbuff_t * +tvb_new_child_real_data(tvbuff_t *parent, const guint8* data, const guint length, const gint reported_length) +{ + tvbuff_t *tvb = tvb_new_real_data(data, length, reported_length); + + tvb_set_child_real_data_tvbuff(parent, tvb); + + return tvb; +} |