Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0aec51c86986f61de26dd04913667af544a8b8eb
Commit:     0aec51c86986f61de26dd04913667af544a8b8eb
Parent:     6b811d43f6cc9eccdfc011a99f8571df2abc46d1
Author:     Gerrit Renker <[EMAIL PROTECTED]>
AuthorDate: Tue Mar 20 12:45:59 2007 -0300
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:26:43 2007 -0700

    [DCCP]: Make dccp_delta_seqno return signed numbers
    
    Problem:
---
 net/dccp/dccp.h |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index a2c20a2..afb313f 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -113,9 +113,12 @@ static inline void dccp_inc_seqno(u64 *seqno)
        *seqno = ADD48(*seqno, 1);
 }
 
-static inline u64 dccp_delta_seqno(u64 seqno1, u64 seqno2)
+/* signed mod-2^48 distance: pos. if seqno1 < seqno2, neg. if seqno1 > seqno2 
*/
+static inline s64 dccp_delta_seqno(const u64 seqno1, const u64 seqno2)
 {
-       return ((seqno2 << 16) - (seqno1 << 16)) >> 16;
+       u64 delta = SUB48(seqno2, seqno1);
+
+       return TO_SIGNED48(delta);
 }
 
 /* is seq1 < seq2 ? */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to