[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] tcp_enqueue fails at more than two tcp_enqueue's
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] tcp_enqueue fails at more than two tcp_enqueue's |
Date: |
Wed, 5 May 2010 19:55:58 +0100 |
On 4 May 2010, at 22:20, Jimi Simpson wrote:
> #define TCP_SEQ_LT(a,b) ((s32_t)((a)-(b)) < 0) -- no change
> #define TCP_SEQ_LEQ(a,b) ((s32_t)((a)-(b)) <= 0) -- no change
> #define TCP_SEQ_GT(a,b) ((s32_t)((a)-(b)) > 0) -- no change
> #define TCP_SEQ_GEQ(a,b) (((s32_t)(a)-(b)) >= 0) -- this line, I have
> shifted the cast and this works now
That doesn't make much sense. Sequence numbers should use unsigned arithmetic,
so the cast you have should not give the right answer in all cases.
Kieran