summaryrefslogtreecommitdiff
path: root/epan/tvbuff.h
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-04-03 15:30:38 +0000
committerGerald Combs <gerald@wireshark.org>2009-04-03 15:30:38 +0000
commit342a836bba1e52a50f157a7f4362d37a1be7803c (patch)
tree8518f978d3686362d4f16ce101c6ace83463d072 /epan/tvbuff.h
parenta3601ba7d41da90c475d2033a6f2a2ea665aca7f (diff)
downloadwireshark-342a836bba1e52a50f157a7f4362d37a1be7803c.tar.gz
Make the "length" argument of the tvb_mem* functions a size_t since it's
not uncommon to pass them the result of pointer arithmetic. Add size_t casts in other areas. svn path=/trunk/; revision=27941
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r--epan/tvbuff.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/tvbuff.h b/epan/tvbuff.h
index 91e704a148..6c203f5f28 100644
--- a/epan/tvbuff.h
+++ b/epan/tvbuff.h
@@ -351,17 +351,17 @@ extern guint64 tvb_get_bits64(tvbuff_t *tvb, gint bit_offset, gint no_of_bits, g
* different TVBUFF_REAL_DATA tvbuffs. This function assumes that the
* target memory is already allocated; it does not allocate or free the
* target memory. */
-extern void* tvb_memcpy(tvbuff_t*, void* target, gint offset, gint length);
+extern void* tvb_memcpy(tvbuff_t*, void* target, gint offset, size_t length);
/** It is the user's responsibility to g_free() the memory allocated by
* tvb_memdup(). Calls tvb_memcpy() */
-extern void* tvb_memdup(tvbuff_t*, gint offset, gint length);
+extern void* tvb_memdup(tvbuff_t*, gint offset, size_t length);
/* Same as above but the buffer returned from this function does not have to
* be freed. It will be automatically freed after the packet is dissected.
* Buffers allocated by this function are NOT persistent.
*/
-extern void* ep_tvb_memdup(tvbuff_t *tvb, gint offset, gint length);
+extern void* ep_tvb_memdup(tvbuff_t *tvb, gint offset, size_t length);
/** WARNING! This function is possibly expensive, temporarily allocating
* another copy of the packet data. Furthermore, it's dangerous because once
@@ -605,7 +605,7 @@ extern gint tvb_strncaseeql(tvbuff_t *tvb, gint offset, const gchar *str,
* it returns 0 (meaning "equal") and -1 otherwise, otherwise return -1.
*/
extern gint tvb_memeql(tvbuff_t *tvb, gint offset, const guint8 *str,
- gint size);
+ size_t size);
/**
* Format a bunch of data from a tvbuff as bytes, returning a pointer