Add a new function, tvb_new_subset_remaining(), which is a sligtly optimized version...
authorkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 16 Aug 2009 10:53:47 +0000 (10:53 +0000)
committerkrj <krj@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 16 Aug 2009 10:53:47 +0000 (10:53 +0000)
commit8f77f850247078209413d7a259b52411aa6b0303
tree5b238ca1101ce3563203839bb86e177ab1158fe6
parentb166e0903bcf3414c3d0414dd877252aedc29434
Add a new function, tvb_new_subset_remaining(), which is a sligtly optimized version of tvb_new_subset(). The latter can be mapped to the former by tvb_new_subset(tvb, offset, -1 /* backing_length */, -1 /* reported_length */). We can disable some bounds checking because 'backing_length' and 'reported_length' are hardcoded to -1.

The current implementation of tvb_new_subset_remaining() only has the THROW_ON(reported_length < 1) check removed when compared to tvb_new_subset(). So there's room for improvement in this function. We should be able to disable some more (redundant) bounds checking.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@29445 f5534014-38df-0310-8fa8-9805f1628bb7
epan/tvbuff.c
epan/tvbuff.h