Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2e2173df68f419aa41558e1fa90d7263b2d0211f
Commit:     2e2173df68f419aa41558e1fa90d7263b2d0211f
Parent:     01590d20b42400be46cf4e565b39764e38ca87fe
Author:     Stefan Richter <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 2 02:21:46 2007 +0200
Committer:  Stefan Richter <[EMAIL PROTECTED]>
CommitDate: Mon Apr 30 00:00:31 2007 +0200

    ieee1394: eth1394: clean up fragment_overlap
    
    offset > fi->offset + fi->len - 1  ==  !(offset < fi->offset + fi->len)
    offset + len - 1 < fi->offset      ==  !(offset + len > fi->offset)
    !(A || B)  ==  (!A && !B)
    
    Signed-off-by: Stefan Richter <[EMAIL PROTECTED]>
---
 drivers/ieee1394/eth1394.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c
index 0047343..08f63c8 100644
--- a/drivers/ieee1394/eth1394.c
+++ b/drivers/ieee1394/eth1394.c
@@ -867,12 +867,12 @@ static u16 ether1394_parse_encap(struct sk_buff *skb, 
struct net_device *dev,
 static int fragment_overlap(struct list_head *frag_list, int offset, int len)
 {
        struct fragment_info *fi;
+       int end = offset + len;
 
-       list_for_each_entry(fi, frag_list, list) {
-               if ( ! ((offset > (fi->offset + fi->len - 1)) ||
-                      ((offset + len - 1) < fi->offset)))
+       list_for_each_entry(fi, frag_list, list)
+               if (offset < fi->offset + fi->len && end > fi->offset)
                        return 1;
-       }
+
        return 0;
 }
 
-
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