dect
/
linux-2.6
Archived
13
0
Fork 0

[DCCP]: Make `before' relation unambiguous

Problem:
This commit is contained in:
Gerrit Renker 2007-03-20 13:00:26 -03:00 committed by David S. Miller
parent 0aec51c869
commit d52de17b8c
1 changed files with 2 additions and 5 deletions

View File

@ -124,14 +124,11 @@ static inline s64 dccp_delta_seqno(const u64 seqno1, const u64 seqno2)
/* is seq1 < seq2 ? */
static inline int before48(const u64 seq1, const u64 seq2)
{
return (s64)((seq1 << 16) - (seq2 << 16)) < 0;
return (s64)((seq2 << 16) - (seq1 << 16)) > 0;
}
/* is seq1 > seq2 ? */
static inline int after48(const u64 seq1, const u64 seq2)
{
return (s64)((seq2 << 16) - (seq1 << 16)) < 0;
}
#define after48(seq1, seq2) before48(seq2, seq1)
/* is seq2 <= seq1 <= seq3 ? */
static inline int between48(const u64 seq1, const u64 seq2, const u64 seq3)