On Monday 03 December 2007 10:24:52 am Dag-Erling Smørgrav wrote:
> John Birrell <[EMAIL PROTECTED]> writes:
> >   Log:
> >   Fix strict alias warnings.
> 
> A much simpler solution (relative to the previous revision):
> 
> @@ -131,10 +131,10 @@
>                 sum += oddbyte;
>         }
>  /* "Pseudo-header" data */
> -       ptr = (u_short *) & (pip->ip_dst);
> +       ptr = (void *)&pip->ip_dst;
>         sum += *ptr++;
>         sum += *ptr;
> -       ptr = (u_short *) & (pip->ip_src);
> +       ptr = (void *)&pip->ip_src;
>         sum += *ptr++;
>         sum += *ptr;
>         sum += htons((u_short) ntcp);

*ptr++ would choke since pointer arith on (void *) is undefined AFAIK.

-- 
John Baldwin
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to