diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-12-13 02:10:30 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-12-13 02:10:30 +0000 |
commit | 17c7152c6bee7a71255e3223ce0ebc702ac835c2 (patch) | |
tree | 63fd1ee62ff9dbc8397ca05f4efd6a873da0dd35 /packet-cops.c | |
parent | 6fd5123f908138015b72521a3abfe57dc6853993 (diff) |
Make some variables that hold unsigned 16-bit quantities "guint16",
which lets us get rid of some casts.
svn path=/trunk/; revision=9260
Diffstat (limited to 'packet-cops.c')
-rw-r--r-- | packet-cops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/packet-cops.c b/packet-cops.c index bbab80a992..ab5ca5e3ec 100644 --- a/packet-cops.c +++ b/packet-cops.c @@ -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; |