aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-03-22 20:55:31 +0000
committerBill Meier <wmeier@newsguy.com>2009-03-22 20:55:31 +0000
commitd6a5a7c761ef10390ff79d8bd39a461813112290 (patch)
tree70c7600431ace9c6831016767308c26e2f52fbfd
parent2f6fe511f3638c25630f4d00ea54e86edf91170b (diff)
P64 changes: Fix some cases for which size_t is not required
svn path=/trunk/; revision=27822
-rw-r--r--epan/dissectors/packet-bacapp.c2
-rw-r--r--epan/dissectors/packet-fcswils.c3
-rw-r--r--epan/dissectors/packet-ip.c10
-rw-r--r--epan/dissectors/packet-lwapp.c6
-rw-r--r--epan/dissectors/packet-mip.c6
-rw-r--r--epan/dissectors/packet-msrp.c2
-rw-r--r--epan/dissectors/packet-netflow.c2
-rw-r--r--epan/dissectors/packet-ositp.c2
-rw-r--r--epan/dissectors/packet-ospf.c4
-rw-r--r--epan/dissectors/packet-pgm.c4
-rw-r--r--epan/dissectors/packet-ppp.c2
-rw-r--r--epan/dissectors/packet-radius.c2
-rw-r--r--epan/dissectors/packet-tcp.c2
-rw-r--r--epan/dissectors/packet-tds.c2
-rw-r--r--epan/dissectors/packet-wccp.c2
-rw-r--r--epan/dissectors/packet-windows-common.c5
-rw-r--r--epan/dissectors/packet-wtp.c6
-rw-r--r--epan/dissectors/packet-xtp.c2
18 files changed, 31 insertions, 33 deletions
diff --git a/epan/dissectors/packet-bacapp.c b/epan/dissectors/packet-bacapp.c
index bdb6759563..2fa639f709 100644
--- a/epan/dissectors/packet-bacapp.c
+++ b/epan/dissectors/packet-bacapp.c
@@ -2702,7 +2702,7 @@ fCharacterString (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *la
lvt -= (extra);
do {
- l = inbytesleft = min(lvt, 255);
+ inbytesleft = l = min(lvt, 255);
/*
* XXX - are we guaranteed that these encoding
* names correspond, on *all* platforms with
diff --git a/epan/dissectors/packet-fcswils.c b/epan/dissectors/packet-fcswils.c
index c9584e9c98..aa9f29d25b 100644
--- a/epan/dissectors/packet-fcswils.c
+++ b/epan/dissectors/packet-fcswils.c
@@ -772,11 +772,10 @@ dissect_swils_elp (tvbuff_t *tvb, proto_tree *elp_tree, guint8 isreq _U_)
if (elp.cls1_svcparm[0] & 0x80) {
#define MAX_FLAGS_LEN 40
char *flagsbuf;
- size_t stroff, returned_length;
+ gint stroff, returned_length;
flagsbuf=ep_alloc(MAX_FLAGS_LEN);
stroff = 0;
- flagsbuf[stroff]=0;
returned_length = g_snprintf (flagsbuf+stroff, MAX_FLAGS_LEN-stroff,
"Class 1 Valid");
diff --git a/epan/dissectors/packet-ip.c b/epan/dissectors/packet-ip.c
index 5f8c77fbad..55898d851c 100644
--- a/epan/dissectors/packet-ip.c
+++ b/epan/dissectors/packet-ip.c
@@ -1788,7 +1788,7 @@ static const value_string mip_extensions[] = {
* Dissect the mobile ip advertisement extensions.
*/
static void
-dissect_mip_extensions(tvbuff_t *tvb, size_t offset, proto_tree *tree)
+dissect_mip_extensions(tvbuff_t *tvb, int offset, proto_tree *tree)
{
guint8 type;
guint8 length;
@@ -1937,7 +1937,7 @@ dissect_mip_extensions(tvbuff_t *tvb, size_t offset, proto_tree *tree)
* Dissect the MPLS extensions
*/
static void
-dissect_mpls_extensions(tvbuff_t *tvb, size_t offset, proto_tree *tree)
+dissect_mpls_extensions(tvbuff_t *tvb, gint offset, proto_tree *tree)
{
guint8 version;
guint8 class_num;
@@ -1949,7 +1949,7 @@ dissect_mpls_extensions(tvbuff_t *tvb, size_t offset, proto_tree *tree)
guint16 obj_length, obj_trunc_length;
proto_item *ti, *tf_object, *tf_entry, *hidden_item;
proto_tree *mpls_tree=NULL, *mpls_object_tree, *mpls_stack_object_tree;
- guint obj_end_offset;
+ gint obj_end_offset;
guint reported_length;
guint label;
gboolean unknown_object;
@@ -2135,8 +2135,8 @@ dissect_mpls_extensions(tvbuff_t *tvb, size_t offset, proto_tree *tree)
proto_tree_add_text(mpls_object_tree, tvb,
offset,
obj_end_offset - offset,
- "%ld junk bytes",
- (long)(obj_end_offset - offset));
+ "%d junk bytes",
+ obj_end_offset - offset);
break;
default:
diff --git a/epan/dissectors/packet-lwapp.c b/epan/dissectors/packet-lwapp.c
index f660789534..d049ec9ebd 100644
--- a/epan/dissectors/packet-lwapp.c
+++ b/epan/dissectors/packet-lwapp.c
@@ -267,7 +267,7 @@ static void dissect_control(tvbuff_t *tvb, packet_info *pinfo,
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
- size_t offset=0;
+ gint offset=0;
/* Make entries in Protocol column and Info column on summary display */
if (check_col(pinfo->cinfo, COL_PROTOCOL))
@@ -330,7 +330,7 @@ static void dissect_lwapp_l3(tvbuff_t *tvb, packet_info *pinfo,
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
proto_tree *lwapp_tree;
- size_t offset=0;
+ gint offset=0;
tvbuff_t *next_client;
/* Make entries in Protocol column and Info column on summary display */
@@ -375,7 +375,7 @@ static void dissect_lwapp(tvbuff_t *tvb, packet_info *pinfo,
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
- size_t offset=0;
+ gint offset=0;
/* Make entries in Protocol column and Info column on summary display */
if (check_col(pinfo->cinfo, COL_PROTOCOL))
diff --git a/epan/dissectors/packet-mip.c b/epan/dissectors/packet-mip.c
index 622b0315a2..fc359c10a5 100644
--- a/epan/dissectors/packet-mip.c
+++ b/epan/dissectors/packet-mip.c
@@ -355,12 +355,12 @@ dissect_mip_extensions( tvbuff_t *tvb, int offset, proto_tree *tree)
proto_tree *ext_flags_tree;
proto_tree *tp;
proto_tree *pmipv4_tree;
- size_t ext_len;
+ gint ext_len;
guint8 ext_type;
guint8 ext_subtype=0;
guint8 pmipv4skipext_type;
guint16 flags;
- size_t hdrLen;
+ gint hdrLen;
/* None of this really matters if we don't have a tree */
if (!tree) return;
@@ -562,7 +562,7 @@ dissect_mip( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
proto_tree *flags_tree;
guint8 type;
guint16 flags;
- size_t offset=0;
+ gint offset=0;
const guint8 *reftime;
tvbuff_t *next_tvb;
diff --git a/epan/dissectors/packet-msrp.c b/epan/dissectors/packet-msrp.c
index b83a6cec90..42a9de5eb6 100644
--- a/epan/dissectors/packet-msrp.c
+++ b/epan/dissectors/packet-msrp.c
@@ -483,7 +483,7 @@ dissect_msrp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint hf_index;
gint value_offset;
guchar c;
- size_t value_len;
+ gint value_len;
char *value;
gboolean have_body = FALSE;
gboolean found_match = FALSE;
diff --git a/epan/dissectors/packet-netflow.c b/epan/dissectors/packet-netflow.c
index c2049333bf..2f00264aa9 100644
--- a/epan/dissectors/packet-netflow.c
+++ b/epan/dissectors/packet-netflow.c
@@ -510,7 +510,7 @@ dissect_netflow(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
unsigned int pduret, ver = 0, pdus = 0, x = 1;
hdrinfo_t hdrinfo;
gint flow_len = -1;
- size_t available, pdusize, offset = 0;
+ guint available, pdusize, offset = 0;
nstime_t ts;
dissect_pdu_t *pduptr;
diff --git a/epan/dissectors/packet-ositp.c b/epan/dissectors/packet-ositp.c
index 7ccbfc240b..e508c4597d 100644
--- a/epan/dissectors/packet-ositp.c
+++ b/epan/dissectors/packet-ositp.c
@@ -311,7 +311,7 @@ static gchar *print_tsap(const guchar *tsap, int length)
gchar *cur;
gboolean allprintable;
- size_t idx = 0, returned_length;
+ gint idx = 0, returned_length;
cur=ep_alloc(MAX_TSAP_LEN * 2 + 3);
cur[0] = '\0';
diff --git a/epan/dissectors/packet-ospf.c b/epan/dissectors/packet-ospf.c
index 7670b9e701..0d3380a60d 100644
--- a/epan/dissectors/packet-ospf.c
+++ b/epan/dissectors/packet-ospf.c
@@ -1126,11 +1126,11 @@ dissect_ospf_bitfield (proto_tree *parent_tree, tvbuff_t *tvb, int offset,
proto_tree *tree = NULL;
guint32 flags;
char *str;
- size_t length, pos;
+ gint length, pos;
gint i;
header_field_info *hfinfo;
int hfindex, index;
- size_t returned_length;
+ gint returned_length;
hfindex = ospf_filter[bfinfo->hfindex];
hfinfo = proto_registrar_get_nth(hfindex);
diff --git a/epan/dissectors/packet-pgm.c b/epan/dissectors/packet-pgm.c
index 5581755a37..91c3beed56 100644
--- a/epan/dissectors/packet-pgm.c
+++ b/epan/dissectors/packet-pgm.c
@@ -258,7 +258,7 @@ static const char *
optsstr(guint8 opts)
{
char *msg;
- size_t returned_length, index = 0;
+ gint returned_length, index = 0;
const int MAX_STR_LEN = 256;
if (opts == 0)
@@ -290,7 +290,7 @@ static const char *
paritystr(guint8 parity)
{
char *msg;
- size_t returned_length, index = 0;
+ gint returned_length, index = 0;
const int MAX_STR_LEN = 256;
if (parity == 0)
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index 9ef8d2bcfa..2461b2e42b 100644
--- a/epan/dissectors/packet-ppp.c
+++ b/epan/dissectors/packet-ppp.c
@@ -1691,7 +1691,7 @@ dissect_lcp_async_map_opt(const ip_tcp_opt *optp, tvbuff_t *tvb, int offset,
"DLE", "DC1 (XON)", "DC2", "DC3 (XOFF)", "DC4", "NAK", "SYN", "ETB",
"CAN", "EM", "SUB", "ESC", "FS", "GS", "RS", "US"
};
- size_t returned_length, str_index;
+ gint returned_length, str_index;
int i;
/*
diff --git a/epan/dissectors/packet-radius.c b/epan/dissectors/packet-radius.c
index 2c5ae43876..1981a28ea8 100644
--- a/epan/dissectors/packet-radius.c
+++ b/epan/dissectors/packet-radius.c
@@ -426,7 +426,7 @@ radius_decrypt_avp(gchar *dest,int dest_len,tvbuff_t *tvb,int offset,int length)
md5_state_t md_ctx;
md5_byte_t digest[16];
int i;
- size_t totlen, returned_length;
+ gint totlen, returned_length;
const guint8 *pd;
guchar c;
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c
index 9cea1e3671..e9c9c30a6c 100644
--- a/epan/dissectors/packet-tcp.c
+++ b/epan/dissectors/packet-tcp.c
@@ -2929,7 +2929,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
int offset = 0;
gchar *flags = "<None>";
const gchar *fstr[] = {"FIN", "SYN", "RST", "PSH", "ACK", "URG", "ECN", "CWR"};
- size_t fpos = 0, returned_length;
+ gint fpos = 0, returned_length;
gint i;
guint bpos;
guint optlen;
diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c
index ec1e804ed1..c39d57e172 100644
--- a/epan/dissectors/packet-tds.c
+++ b/epan/dissectors/packet-tds.c
@@ -978,7 +978,7 @@ static char *data_to_string(void *data, guint col_type, guint col_size)
* the length must be computed using the column information seen in the result
* PDU. This function does just that.
*/
-static size_t
+static guint
tds_get_row_size(tvbuff_t *tvb, struct _netlib_data *nl_data, guint offset)
{
guint cur, i, csize;
diff --git a/epan/dissectors/packet-wccp.c b/epan/dissectors/packet-wccp.c
index 72ba4a9811..499a6a8051 100644
--- a/epan/dissectors/packet-wccp.c
+++ b/epan/dissectors/packet-wccp.c
@@ -1201,7 +1201,7 @@ dissect_32_bit_capability_flags(tvbuff_t *tvb, int curr_offset,
int i;
char *flags_string;
char *p;
- size_t returned_length, str_index = 0;
+ gint returned_length, str_index = 0;
char *buf;
if (capability_val_len != 4) {
diff --git a/epan/dissectors/packet-windows-common.c b/epan/dissectors/packet-windows-common.c
index 701a581098..c84a0ef334 100644
--- a/epan/dissectors/packet-windows-common.c
+++ b/epan/dissectors/packet-windows-common.c
@@ -1388,8 +1388,8 @@ dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
char *str;
char *sid_string;
char *sid_name;
- size_t returned_length;
- unsigned long str_index;;
+ gint returned_length;
+ gint str_index;;
if(sid_str){
@@ -1428,7 +1428,6 @@ dissect_nt_sid(tvbuff_t *tvb, int offset, proto_tree *parent_tree,
str = ep_alloc(MAX_STR_LEN);
str_index = 0;
- str[str_index]=0;
/* sub authorities, leave RID to last */
for(i=0; i < (num_auth > 4?(num_auth - 1):num_auth); i++){
diff --git a/epan/dissectors/packet-wtp.c b/epan/dissectors/packet-wtp.c
index 22792b5f1f..5601a9dc81 100644
--- a/epan/dissectors/packet-wtp.c
+++ b/epan/dissectors/packet-wtp.c
@@ -308,10 +308,10 @@ static void
dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
char *szInfo;
- int offCur = 0; /* current offset from start of WTP data */
- size_t returned_length, str_index = 0;
+ int offCur = 0; /* current offset from start of WTP data */
+ gint returned_length, str_index = 0;
- unsigned char b0;
+ unsigned char b0;
/* continuation flag */
unsigned char fCon; /* Continue flag */
diff --git a/epan/dissectors/packet-xtp.c b/epan/dissectors/packet-xtp.c
index 8c45f1f3f3..5b39dbe9d3 100644
--- a/epan/dissectors/packet-xtp.c
+++ b/epan/dissectors/packet-xtp.c
@@ -806,7 +806,7 @@ dissect_xtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
const char *fstr[] = { "<None>", "NOCHECK", "EDGE", "NOERR", "MULTI", "RES",
"SORT", "NOFLOW", "FASTNAK", "SREQ", "DREQ",
"RCLOSE", "WCLOSE", "EOM", "END", "BTAG" };
- size_t fpos = 0, returned_length;
+ gint fpos = 0, returned_length;
guint i, bpos;
guint cmd_options;
vec_t cksum_vec[1];