On Sun, Apr 14, 2002 at 02:48:39PM +0200, Joerg Mayer wrote: > the attached patch fixes some more unused warnings. Checked in (except for the capture_ patches, as per your later mail). > /* Build TCP and IP headers */ > hdrlen = lo_nibble(ip->ihl_version) * 4 + TCP_OFFSET(thp) * 4; > - thp->cksum = htons((tvb_get_guint8(src_tvb, offset++) << 8) | > - tvb_get_guint8(src_tvb, offset++)); > + thp->cksum = tvb_get_guint8(src_tvb, offset++) << 8; > + thp->cksum |= tvb_get_guint8(src_tvb, offset++); > + thp->cksum = htons(thp->cksum); I also changed that to just use "tvb_get_ntohs()" rather than to do the "ntohs" by hand.
Powered by MHonArc 2.6.10