aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tds.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-02-18 19:31:46 +0000
committerGuy Harris <guy@alum.mit.edu>2013-02-18 19:31:46 +0000
commit6a420594ab263a819d082fa871e63e64fc78d249 (patch)
tree0fac1fc8840848a82482523f82f189b4a77e8992 /epan/dissectors/packet-tds.c
parente606c22ee3171e9d51e51bc4023067497c0b68ad (diff)
Enums aren't guaranteed to be able to hold a value that doesn't fit in
an int, so don't use enums for special values of the PLP length field. In addition, use G_GINT64_CONSTANT() to tag them as appropriate for a guint64. svn path=/trunk/; revision=47737
Diffstat (limited to 'epan/dissectors/packet-tds.c')
-rw-r--r--epan/dissectors/packet-tds.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c
index 130475d9df..e272baaa5b 100644
--- a/epan/dissectors/packet-tds.c
+++ b/epan/dissectors/packet-tds.c
@@ -1890,7 +1890,9 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto
sub_tree = proto_item_add_subtree(item, ett_tds_type_varbyte);
if(plp) {
- enum { PLP_TERMINATOR = 0x00000000UL, UNKNOWN_PLP_LEN = 0xFFFFFFFFFFFFFFFEULL, PLP_NULL = 0xFFFFFFFFFFFFFFFFULL };
+#define PLP_TERMINATOR G_GINT64_CONSTANT(0x0000000000000000U)
+#define UNKNOWN_PLP_LEN G_GINT64_CONSTANT(0xFFFFFFFFFFFFFFFEU)
+#define PLP_NULL G_GINT64_CONSTANT(0xFFFFFFFFFFFFFFFFU)
guint64 plp_length = tvb_get_letoh64(tvb, *offset);
length_item = proto_tree_add_item(sub_tree, hf_tds_type_varbyte_plp_len, tvb, *offset, 8, ENC_LITTLE_ENDIAN);
*offset += 8;