]> The Tcpdump Group git mirrors - tcpdump/commitdiff
The ANSI C Committee sayeth "Thou shalt not add to a pointer to void,
authorguy <guy>
Tue, 8 Nov 2005 02:49:03 +0000 (02:49 +0000)
committerguy <guy>
Tue, 8 Nov 2005 02:49:03 +0000 (02:49 +0000)
for a void hath no size".

print-dccp.c

index 1a9d88827d036a71c7c43d6cb86791d3ca188662..747f6d9cc68a34444445667e7e2531b1f55b4bba 100644 (file)
@@ -9,7 +9,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.1.2.2 2005-09-20 06:25:45 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-dccp.c,v 1.1.2.3 2005-11-08 02:49:03 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -146,7 +146,7 @@ static u_int64_t dccp_seqno(const struct dccp_hdr *dh)
        u_int64_t seqno = EXTRACT_24BITS(&seq_high) & 0xFFFFFF;
 
        if (DCCPH_X(dh) != 0) {
-               const struct dccp_hdr_ext *dhx = (void *)dh + sizeof(*dh);
+               const struct dccp_hdr_ext *dhx = (void *)(dh + 1);
                u_int32_t seq_low = dhx->dccph_seq_low;
                seqno &= 0x00FFFF;  /* clear reserved field */
                seqno = (seqno << 32) + EXTRACT_32BITS(&seq_low);