]> The Tcpdump Group git mirrors - tcpdump/commitdiff
clarify some signedness mixup
authoritojun <itojun>
Fri, 16 Nov 2001 08:59:21 +0000 (08:59 +0000)
committeritojun <itojun>
Fri, 16 Nov 2001 08:59:21 +0000 (08:59 +0000)
interface.h
print-ripng.c
print-tcp.c

index 6d71f0425e85c6ebe31d32e66db4583959b2a200..c57996e902919287953b90b2ba9f029a035ff89a 100644 (file)
@@ -18,7 +18,7 @@
  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.174 2001-10-08 16:12:12 fenner Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/tcpdump/interface.h,v 1.175 2001-11-16 08:59:21 itojun Exp $ (LBL)
  */
 
 #ifndef tcpdump_interface_h
@@ -295,7 +295,7 @@ extern int hbhopt_print(const u_char *);
 extern int dstopt_print(const u_char *);
 extern int frag6_print(const u_char *, const u_char *);
 extern void icmp6_print(const u_char *, const u_char *);
-extern void ripng_print(const u_char *, int);
+extern void ripng_print(const u_char *, unsigned int);
 extern int rt6_print(const u_char *, const u_char *);
 extern void ospf6_print(const u_char *, u_int);
 extern void dhcp6_print(const u_char *, u_int, u_int16_t, u_int16_t);
index 4c90bd9dae33ca2b1923590f22f4cc9576a0b965..e4000ff1248ddd3e034e29e42ae9ae52cd49632c 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.9 2001-11-16 08:48:33 itojun Exp $";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-ripng.c,v 1.10 2001-11-16 08:59:22 itojun Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -57,7 +57,7 @@ rip6_entry_print(register const struct netinfo6 *ni, int metric)
 }
 
 void
-ripng_print(const u_char *dat, int length)
+ripng_print(const u_char *dat, unsigned int length)
 {
        register const struct rip6 *rp = (struct rip6 *)dat;
        register const struct netinfo6 *ni;
@@ -81,7 +81,7 @@ ripng_print(const u_char *dat, int length)
                        break;
                }
                if (j * sizeof(*ni) != length - 4)
-                       printf(" ripng-req %d[%d]:", j, length);
+                       printf(" ripng-req %d[%u]:", j, length);
                else
                        printf(" ripng-req %d:", j);
                trunc = ((i / sizeof(*ni)) * sizeof(*ni) != i);
@@ -96,7 +96,7 @@ ripng_print(const u_char *dat, int length)
        case RIP6_RESPONSE:
                j = length / sizeof(*ni);
                if (j * sizeof(*ni) != length - 4)
-                       printf(" ripng-resp %d[%d]:", j, length);
+                       printf(" ripng-resp %d[%u]:", j, length);
                else
                        printf(" ripng-resp %d:", j);
                trunc = ((i / sizeof(*ni)) * sizeof(*ni) != i);
@@ -111,7 +111,7 @@ ripng_print(const u_char *dat, int length)
                        printf("[|ripng]");
                break;
        default:
-               printf(" ripng-%d ?? %d", rp->rip6_cmd, length);
+               printf(" ripng-%d ?? %u", rp->rip6_cmd, length);
                break;
        }
        if (rp->rip6_vers != RIP6_VERSION)
index d91003df9a0bc16723eaf1d279c18ec7ea0ec810..2b50b5d141346ae6b30ae06e36653fb7d72aebf2 100644 (file)
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.93 2001-11-05 08:23:40 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-tcp.c,v 1.94 2001-11-16 08:59:22 itojun Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -417,7 +417,7 @@ tcp_print(register const u_char *bp, register u_int length,
 
        length -= hlen;
        if (vflag > 1 || length > 0 || flags & (TH_SYN | TH_FIN | TH_RST))
-               (void)printf(" %u:%u(%d)", seq, seq + length, length);
+               (void)printf(" %u:%u(%u)", seq, seq + length, length);
        if (flags & TH_ACK)
                (void)printf(" ack %u", ack);