From: Gerrit Renker Date: Tue, 20 Mar 2007 16:00:26 +0000 (-0300) Subject: [DCCP]: Make `before' relation unambiguous X-Git-Tag: v2.6.22-rc1~1128^2~243 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d52de17b8cf36d43a9d6977e7861a9f415541c6b;p=linux-2.6 [DCCP]: Make `before' relation unambiguous Problem: --- diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index afb313ff21..1615986a8d 100644 --- a/net/dccp/dccp.h +++ b/net/dccp/dccp.h @@ -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)