aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-03-29 13:22:27 -0700
committerGuy Harris <guy@alum.mit.edu>2014-03-29 20:23:09 +0000
commitd156deff0412a16f4a33e4f05d86307fdbca6cd3 (patch)
treeb2fb89b89393378e054989ad4088f4900697ae26 /epan
parent8ffdf4249aabae6ac653ecd29b1f8970d156278f (diff)
Rename "size" variable to "length", to match other string routines.
Change-Id: I385345cfafc7e7b4d3e66713fb0fe570b39f438d Reviewed-on: https://code.wireshark.org/review/865 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan')
-rw-r--r--epan/tvbuff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/tvbuff.c b/epan/tvbuff.c
index 84881f1f85..18f78a4c83 100644
--- a/epan/tvbuff.c
+++ b/epan/tvbuff.c
@@ -2003,16 +2003,16 @@ tvb_get_ucs_2_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset,
* REPLACEMENT CHARACTER at the end.
*/
static wmem_strbuf_t *
-tvb_extract_utf_16_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, gint size, const guint encoding)
+tvb_extract_utf_16_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint offset, gint length, const guint encoding)
{
wmem_strbuf_t *strbuf;
gunichar2 uchar2, lead_surrogate;
gunichar uchar;
gint i; /* Byte counter for tvbuff */
- strbuf = wmem_strbuf_sized_new(scope, size+1, 0);
+ strbuf = wmem_strbuf_sized_new(scope, length+1, 0);
- for(i = 0; i + 1 < size; i += 2) {
+ for(i = 0; i + 1 < length; i += 2) {
if (encoding == ENC_BIG_ENDIAN)
uchar2 = tvb_get_ntohs(tvb, offset + i);
else
@@ -2024,7 +2024,7 @@ tvb_extract_utf_16_string(wmem_allocator_t *scope, tvbuff_t *tvb, const gint off
* a trail surrogate.
*/
i += 2;
- if (i + 1 >= size) {
+ if (i + 1 >= length) {
/*
* Oops, string ends with a lead surrogate.
* Ignore this for now.