Make routines that are passed an unsigned integer as their last argument
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 3 Sep 2001 08:10:46 +0000 (08:10 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 3 Sep 2001 08:10:46 +0000 (08:10 +0000)
have an unsigned integer as that argument; this squelches some compiler
warnings, and it's the right thing to do in any case.

Don't check whether an unsigned integer value is > 0 - that's the same
as checking whether it's != 0.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3898 f5534014-38df-0310-8fa8-9805f1628bb7

packet-rtcp.c

index c0ace87c3b80e175ae5fbe6f1c916971fca49725..206118c5882398813672dce6db1cb7e0b228e59e 100644 (file)
@@ -1,6 +1,6 @@
 /* packet-rtcp.c
  *
- * $Id: packet-rtcp.c,v 1.19 2001/08/18 09:27:06 guy Exp $
+ * $Id: packet-rtcp.c,v 1.20 2001/09/03 08:10:46 guy Exp $
  *
  * Routines for RTCP dissection
  * RTCP = Real-time Transport Control Protocol
@@ -369,7 +369,7 @@ dissect_rtcp_app( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
 
 static int
 dissect_rtcp_bye( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
-    int count )
+    unsigned int count )
 {
        unsigned int chunk          = 1;
        unsigned int reason_length  = 0;
@@ -401,7 +401,7 @@ dissect_rtcp_bye( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
 
 static int
 dissect_rtcp_sdes( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
-    int count )
+    unsigned int count )
 {
        unsigned int chunk          = 1;
        proto_item *sdes_item;
@@ -506,7 +506,7 @@ dissect_rtcp_sdes( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
 
 static int
 dissect_rtcp_rr( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
-    int count )
+    unsigned int count )
 {
        unsigned int counter = 1;
        proto_tree *ssrc_tree = (proto_tree*) NULL;
@@ -579,7 +579,7 @@ dissect_rtcp_rr( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
 
 static int
 dissect_rtcp_sr( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
-    int count )
+    unsigned int count )
 {
 #if 0
        gchar buff[ NTP_TS_SIZE ];
@@ -613,7 +613,7 @@ dissect_rtcp_sr( tvbuff_t *tvb, int offset, frame_data *fd, proto_tree *tree,
        offset += 4;
 
        /* The rest of the packet is equal to the RR packet */
-       if ( count > 0 )
+       if ( count != 0 )
                offset = dissect_rtcp_rr( tvb, offset, fd, tree, count );
 
        return offset;