diff options
-rw-r--r-- | net/dccp/dccp.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index afb313ff216e..1615986a8d92 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) | |||
124 | /* is seq1 < seq2 ? */ | 124 | /* is seq1 < seq2 ? */ |
125 | static inline int before48(const u64 seq1, const u64 seq2) | 125 | static inline int before48(const u64 seq1, const u64 seq2) |
126 | { | 126 | { |
127 | return (s64)((seq1 << 16) - (seq2 << 16)) < 0; | 127 | return (s64)((seq2 << 16) - (seq1 << 16)) > 0; |
128 | } | 128 | } |
129 | 129 | ||
130 | /* is seq1 > seq2 ? */ | 130 | /* is seq1 > seq2 ? */ |
131 | static inline int after48(const u64 seq1, const u64 seq2) | 131 | #define after48(seq1, seq2) before48(seq2, seq1) |
132 | { | ||
133 | return (s64)((seq2 << 16) - (seq1 << 16)) < 0; | ||
134 | } | ||
135 | 132 | ||
136 | /* is seq2 <= seq1 <= seq3 ? */ | 133 | /* is seq2 <= seq1 <= seq3 ? */ |
137 | static inline int between48(const u64 seq1, const u64 seq2, const u64 seq3) | 134 | static inline int between48(const u64 seq1, const u64 seq2, const u64 seq3) |