diff options
author | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-11-06 20:22:28 +0000 |
---|---|---|
committer | Jakub Zawadzki <darkjames-ws@darkjames.pl> | 2013-11-06 20:22:28 +0000 |
commit | b4be2fa489f3daf9352d6994d02e7fc81cee0429 (patch) | |
tree | 3d7b68f14e078d0919433673226d3862f1405122 /epan/tvbuff.c | |
parent | d54b3a74f654f1d18ee1a0dd01fb7ed03c07e4c1 (diff) | |
download | wireshark-b4be2fa489f3daf9352d6994d02e7fc81cee0429.tar.gz |
tvbuff: use always ops->tvb_size
svn path=/trunk/; revision=53112
Diffstat (limited to 'epan/tvbuff.c')
-rw-r--r-- | epan/tvbuff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c index 05b6358c2c..1c25408bee 100644 --- a/epan/tvbuff.c +++ b/epan/tvbuff.c @@ -57,7 +57,7 @@ tvbuff_t * tvb_new(const struct tvb_ops *ops) { tvbuff_t *tvb; - gsize size = ops->tvb_size ? ops->tvb_size : sizeof(*tvb); + gsize size = ops->tvb_size; g_assert(size >= sizeof(*tvb)); @@ -86,7 +86,7 @@ tvb_free_internal(tvbuff_t *tvb) if (tvb->ops->tvb_free) tvb->ops->tvb_free(tvb); - size = (tvb->ops->tvb_size) ? tvb->ops->tvb_size : sizeof(*tvb); + size = tvb->ops->tvb_size; g_slice_free1(size, tvb); } |