[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-users] lwip_standard_chksum()
From: |
Curt McDowell |
Subject: |
RE: [lwip-users] lwip_standard_chksum() |
Date: |
Fri, 9 Dec 2005 12:02:13 -0800 |
Leon Woestenberg wrote:
> u8_t *pb = dataptr;
> u16_t *ps, t = 0;
> u32_t sum = 0;
> int odd = ((u32_t)pb & 1);
>
> /* Get aligned to u16_t */
> if (odd && len > 0) {
> ((u8_t *)&t)[1] = *pb++;
>
> [...]
>
> What should be done here is fetch a 8-bit number on a
> 8-bit aligned address (which is always the case :-)).
Hi Leon,
That's exactly what it's doing.
Please take another look... and then take another beer :-)
Regards,
Curt McDowell
Broadcom Corp.