Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] master 14824e6: Revert "Fixup: tvb_* ->
From: Dario Lombardo <[email protected]>
Date: Fri, 20 Jun 2014 09:46:22 +0200
On Thu, Jun 19, 2014 at 9:18 PM, Evan Huus <[email protected]> wrote:
> We were not bulk-converting them so that we could catch the ones that really
> should have been tvb_reported_length and tvb_reported_length_remaining from
> the beginning.

If you look at the code in epan/tvbuff.h:228,237,244 you can find those defines

#define tvb_length tvb_captured_length
#define tvb_length_remaining tvb_captured_length_remaining
#define tvb_ensure_length_remaining tvb_ensure_captured_length_remaining

This means that tvb_length doesn't go to the compiler, since it's
changed to tvb_captured_length by the preprocessor. What about a
change that replaces only these? This should be safe.