diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-09-23 01:14:44 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2010-09-23 01:14:44 +0000 |
commit | 7cdf98c245f5e5d126ad614d64a1048356e9f1da (patch) | |
tree | 17a433c686d70f7e212b57f63de6823ca7d66ff5 /epan | |
parent | f4f8bb343e78973c0be6aa2e35ea4bfb78bf325e (diff) | |
download | wireshark-7cdf98c245f5e5d126ad614d64a1048356e9f1da.tar.gz |
Use gsize (size_t) in a couple of places to make the Win64 build happy.
svn path=/trunk/; revision=34191
Diffstat (limited to 'epan')
-rw-r--r-- | epan/epan.c | 6 | ||||
-rw-r--r-- | epan/epan.h | 4 | ||||
-rw-r--r-- | epan/proto.c | 15 | ||||
-rw-r--r-- | epan/proto.h | 8 |
4 files changed, 17 insertions, 16 deletions
diff --git a/epan/epan.c b/epan/epan.c index 236ea20b92..e68f253411 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -235,9 +235,9 @@ epan_dissect_prime_dfilter(epan_dissect_t *edt, const dfilter_t* dfcode) /* ----------------------- */ const gchar * epan_custom_set(epan_dissect_t *edt, int field_id, - gint occurrence, - gchar *result, - gchar *expr, const int size ) + gint occurrence, + gchar *result, + gchar *expr, const gsize size ) { return proto_custom_set(edt->tree, field_id, occurrence, result, expr, size); } diff --git a/epan/epan.h b/epan/epan.h index 43501d2b10..bc1d44939a 100644 --- a/epan/epan.h +++ b/epan/epan.h @@ -91,7 +91,7 @@ epan_get_version(void); epan_dissect_t* epan_dissect_init(epan_dissect_t *edt, const gboolean create_proto_tree, const gboolean proto_tree_visible); -/** get a new single packet dissection +/** get a new single packet dissection * should be freed using epan_dissect_free() after packet dissection completed */ epan_dissect_t* @@ -125,7 +125,7 @@ epan_dissect_free(epan_dissect_t* edt); /** Sets custom column */ const gchar * epan_custom_set(epan_dissect_t *edt, int id, gint occurrence, - gchar *result, gchar *expr, const int size); + gchar *result, gchar *expr, const gsize size); /** * Get compile-time information for libraries used by libwireshark. diff --git a/epan/proto.c b/epan/proto.c index 131ac50038..cf9d41952e 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -3419,7 +3419,7 @@ proto_tree_set_representation(proto_item *pi, const char *format, va_list ap) /* -------------------------- */ const gchar * proto_custom_set(proto_tree* tree, const int field_id, gint occurrence, - gchar *result, gchar *expr, const int size) + gchar *result, gchar *expr, const gsize size) { guint32 u_integer; gint32 integer; @@ -3430,7 +3430,8 @@ proto_custom_set(proto_tree* tree, const int field_id, gint occurrence, guint32 n_addr; /* network-order IPv4 address */ const true_false_string *tfstring; - int len, last, i, offset=0; + int len, last, i; + gsize offset = 0; GPtrArray *finfos; field_info *finfo = NULL; header_field_info* hfinfo; @@ -3481,7 +3482,7 @@ proto_custom_set(proto_tree* tree, const int field_id, gint occurrence, case FT_PROTOCOL: /* prevent multiple "yes" entries by setting result directly */ - g_strlcpy(result, "Yes", size); + g_strlcpy(result, "Yes", size); break; case FT_UINT_BYTES: @@ -3648,9 +3649,9 @@ proto_custom_set(proto_tree* tree, const int field_id, gint occurrence, g_strlcpy(expr, result, size); break; } - } + } /*XXSLBXX*/ - + return hfinfo->abbrev; } return ""; @@ -7117,7 +7118,7 @@ proto_tree_add_float_bits_format_value(proto_tree *tree, const int hf_index, TRY_TO_FAKE_THIS_ITEM(tree, hf_index, hf_field); DISSECTOR_ASSERT(hf_field->type == FT_FLOAT); - + CREATE_VALUE_STRING(dst,format,ap); return proto_tree_add_bits_format_value(tree, hf_index, tvb, bit_offset, no_of_bits, &value, dst); @@ -7166,7 +7167,7 @@ proto_tree_add_boolean_bits_format_value(proto_tree *tree, const int hf_index, TRY_TO_FAKE_THIS_ITEM(tree, hf_index, hf_field); DISSECTOR_ASSERT(hf_field->type == FT_BOOLEAN); - + CREATE_VALUE_STRING(dst,format,ap); return proto_tree_add_bits_format_value(tree, hf_index, tvb, bit_offset, no_of_bits, &value, dst); diff --git a/epan/proto.h b/epan/proto.h index 19aff82ff7..ef607079fb 100644 --- a/epan/proto.h +++ b/epan/proto.h @@ -321,7 +321,7 @@ typedef struct field_info { /** The protocol field value is in big endian */ #define FI_BIG_ENDIAN 0x00000010 /** Field value start from nth bit (values from 0x20 - 0x100) */ -#define FI_BITS_OFFSET(n) ((n & 7) << 5) +#define FI_BITS_OFFSET(n) ((n & 7) << 5) /** Field value takes n bits (values from 0x100 - 0x4000) */ /* if 0, it means that field takes fi->length * 8 */ #define FI_BITS_SIZE(n) ((n & 63) << 8) @@ -1828,9 +1828,9 @@ proto_check_field_name(const gchar *field_name); @param size the size of the string buffer */ const gchar * proto_custom_set(proto_tree* tree, const int field_id, - gint occurrence, - gchar *result, - gchar *expr, const int size ); + gint occurrence, + gchar *result, + gchar *expr, const gsize size ); #ifdef __cplusplus } |