Make some variables that hold unsigned 16-bit quantities "guint16",
which lets us get rid of some casts. svn path=/trunk/; revision=9260
This commit is contained in:
parent
6fd5123f90
commit
17c7152c6b
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* Copyright 2000, Heikki Vatiainen <hessu@cs.tut.fi>
|
||||
*
|
||||
* $Id: packet-cops.c,v 1.37 2003/12/11 21:23:36 ulfl Exp $
|
||||
* $Id: packet-cops.c,v 1.38 2003/12/13 02:10:30 guy Exp $
|
||||
*
|
||||
* Ethereal - Network traffic analyzer
|
||||
* By Gerald Combs <gerald@ethereal.com>
|
||||
|
@ -604,7 +604,7 @@ static char *cops_c_type_to_str(guint8 c_num, guint8 c_type)
|
|||
|
||||
static int dissect_cops_object(tvbuff_t *tvb, guint32 offset, proto_tree *tree)
|
||||
{
|
||||
int object_len, contents_len;
|
||||
guint16 object_len, contents_len;
|
||||
guint8 c_num, c_type;
|
||||
proto_item *ti;
|
||||
proto_tree *obj_tree;
|
||||
|
@ -641,7 +641,7 @@ static int dissect_cops_object(tvbuff_t *tvb, guint32 offset, proto_tree *tree)
|
|||
offset++;
|
||||
|
||||
contents_len = object_len - COPS_OBJECT_HDR_SIZE;
|
||||
dissect_cops_object_data(tvb, offset, obj_tree, c_num, c_type, (guint16) contents_len);
|
||||
dissect_cops_object_data(tvb, offset, obj_tree, c_num, c_type, contents_len);
|
||||
|
||||
/* Pad to 32bit boundary */
|
||||
if (object_len % sizeof (guint32))
|
||||
|
@ -652,7 +652,7 @@ static int dissect_cops_object(tvbuff_t *tvb, guint32 offset, proto_tree *tree)
|
|||
|
||||
static void dissect_cops_pr_objects(tvbuff_t *tvb, guint32 offset, proto_tree *tree, guint16 pr_len)
|
||||
{
|
||||
int object_len, contents_len;
|
||||
guint16 object_len, contents_len;
|
||||
guint8 s_num, s_type;
|
||||
char *type_str;
|
||||
int ret;
|
||||
|
@ -695,7 +695,7 @@ static void dissect_cops_pr_objects(tvbuff_t *tvb, guint32 offset, proto_tree *t
|
|||
pr_len--;
|
||||
|
||||
contents_len = object_len - COPS_OBJECT_HDR_SIZE;
|
||||
ret = dissect_cops_pr_object_data(tvb, offset, obj_tree, s_num, s_type, (guint16) contents_len);
|
||||
ret = dissect_cops_pr_object_data(tvb, offset, obj_tree, s_num, s_type, contents_len);
|
||||
if (ret < 0)
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue