diff options
author | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-04-03 15:30:38 +0000 |
---|---|---|
committer | gerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-04-03 15:30:38 +0000 |
commit | d3ca4f39461c3c2f51abe0efcfb4bb9660d5335f (patch) | |
tree | 8518f978d3686362d4f16ce101c6ace83463d072 /epan/tvbuff.h | |
parent | d647883c1439968809a40cd2ee8b9c1f738beb60 (diff) |
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.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27941 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/tvbuff.h')
-rw-r--r-- | epan/tvbuff.h | 8 |
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 |