[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Small patch for libicmp/icmp_cksum.c
From: |
Paul Jarc |
Subject: |
Re: Small patch for libicmp/icmp_cksum.c |
Date: |
Wed, 04 Dec 2002 13:13:27 -0500 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) |
address@hidden wrote:
> - {
> - *(u_char *)&answer = *(u_char*)wp;
> - sum += answer;
> - }
> + sum += (unsigned short)*(u_char *)w;
* This won't have the same effect as the original code on a big-endian
system.
* For consistency, it would be better to use the u_short typedef
instead of unsigned short.
* You mistyped the variable name as w instead of wp, which shows that
you didn't even try to compile this code, let alone test it.
paul