aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-02-20 18:06:15 -0500
committerEvan Huus <eapache@gmail.com>2014-02-20 23:07:14 +0000
commit602d7d3d39f26b06bcfa25bf9580cfd652a7eee7 (patch)
tree32b4e6bd0a9d015ae9d3dbaac82261903751441d
parentb7985c57a47d1de54471d96739219baf8617df33 (diff)
g_ascii_strtoull returns a gint64
fixes build errors on certain 32-bit systems Change-Id: I6476107aa753b670df6bede0ce15ea6760e52aeb Reviewed-on: https://code.wireshark.org/review/274 Reviewed-by: Evan Huus <eapache@gmail.com>
-rw-r--r--epan/dissectors/packet-adb_cs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-adb_cs.c b/epan/dissectors/packet-adb_cs.c
index b7486d5a2b..990aa81e89 100644
--- a/epan/dissectors/packet-adb_cs.c
+++ b/epan/dissectors/packet-adb_cs.c
@@ -140,7 +140,7 @@ void proto_reg_handoff_adb_cs(void);
static gint
-dissect_ascii_data_length(proto_tree *tree, tvbuff_t *tvb, gint offset, gint *data_length)
+dissect_ascii_data_length(proto_tree *tree, tvbuff_t *tvb, gint offset, gint64 *data_length)
{
proto_item *sub_item;
proto_tree *sub_tree;
@@ -169,7 +169,7 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
proto_tree *sub_tree;
proto_item *p_item;
gint offset = 0;
- gint length = -1;
+ gint64 length = -1;
guint8 *hex_ascii;
gboolean client_request_service = FALSE;
@@ -229,7 +229,7 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
g_ascii_xdigit_value(hex_ascii_length[3]) >= 0) {
/* probably 4 bytes ascii hex length field */
offset = dissect_ascii_data_length(main_tree, tvb, offset, &length);
- col_append_fstr(pinfo->cinfo, COL_INFO, " Length=%u", length);
+ col_append_fstr(pinfo->cinfo, COL_INFO, " Length=%" G_GUINT64_FORMAT, length);
}
}
@@ -409,7 +409,7 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
if (g_strcmp0(service, "host:version") == 0) {
guint version;
- gint data_length;
+ gint64 data_length;
offset = dissect_ascii_data_length(main_tree, tvb, offset, &data_length);
@@ -427,7 +427,7 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
} else if (g_strcmp0(service, "host:devices") == 0 ||
g_strcmp0(service, "host:devices-l") == 0 ||
g_strcmp0(service, "host:track-devices") == 0) {
- gint data_length;
+ gint64 data_length;
offset = dissect_ascii_data_length(main_tree, tvb, offset, &data_length);
@@ -440,7 +440,7 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
g_strcmp0(service, "host:get-devpath") == 0 ||
g_str_has_prefix(service, "connect:") ||
g_str_has_prefix(service, "disconnect:")) {
- gint data_length;
+ gint64 data_length;
offset = dissect_ascii_data_length(main_tree, tvb, offset, &data_length);
@@ -578,7 +578,7 @@ dissect_adb_cs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
}
}
} else if (g_strcmp0(service, "track-jdwp") == 0) {
- gint data_length;
+ gint64 data_length;
offset = dissect_ascii_data_length(main_tree, tvb, offset, &data_length);