forked from osmocom/wireshark
clean up some comments in tvb_find_line_end()
Change-Id: I9025b479b31e3cc6f8108a163bf00d81008fd737 Reviewed-on: https://code.wireshark.org/review/15632 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
745a6021bc
commit
d1ae5bc961
|
@ -3050,10 +3050,10 @@ static ws_mempbrk_pattern pbrk_crlf;
|
||||||
* Return the length of the line (not counting the line terminator at
|
* Return the length of the line (not counting the line terminator at
|
||||||
* the end), or, if we don't find a line terminator:
|
* the end), or, if we don't find a line terminator:
|
||||||
*
|
*
|
||||||
* if "deseg" is true, return -1;
|
* if "desegment" is true, return -1;
|
||||||
*
|
*
|
||||||
* if "deseg" is false, return the amount of data remaining in
|
* if "desegment" is false, return the amount of data remaining in
|
||||||
* the buffer.
|
* the buffer.
|
||||||
*
|
*
|
||||||
* Set "*next_offset" to the offset of the character past the line
|
* Set "*next_offset" to the offset of the character past the line
|
||||||
* terminator, or past the end of the buffer if we don't find a line
|
* terminator, or past the end of the buffer if we don't find a line
|
||||||
|
@ -3070,12 +3070,11 @@ tvb_find_line_end(tvbuff_t *tvb, const gint offset, int len, gint *next_offset,
|
||||||
|
|
||||||
DISSECTOR_ASSERT(tvb && tvb->initialized);
|
DISSECTOR_ASSERT(tvb && tvb->initialized);
|
||||||
|
|
||||||
if (len == -1)
|
if (len == -1) {
|
||||||
len = _tvb_captured_length_remaining(tvb, offset);
|
len = _tvb_captured_length_remaining(tvb, offset);
|
||||||
/*
|
/* if offset is past the end of the tvbuff, len is now 0 */
|
||||||
* XXX - what if "len" is still -1, meaning "offset is past the
|
}
|
||||||
* end of the tvbuff"?
|
|
||||||
*/
|
|
||||||
eob_offset = offset + len;
|
eob_offset = offset + len;
|
||||||
|
|
||||||
if (!compiled) {
|
if (!compiled) {
|
||||||
|
|
Loading…
Reference in New Issue