diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-04-01 20:21:46 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2007-04-29 18:00:31 -0400 |
commit | 2e2173df68f419aa41558e1fa90d7263b2d0211f (patch) | |
tree | c700d159ebf78ecc86d42d5b337933f8c0795d04 /drivers/ieee1394 | |
parent | 01590d20b42400be46cf4e565b39764e38ca87fe (diff) |
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 <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394')
-rw-r--r-- | 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 0047343dbc22..08f63c8d9b25 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, | |||
867 | static int fragment_overlap(struct list_head *frag_list, int offset, int len) | 867 | static int fragment_overlap(struct list_head *frag_list, int offset, int len) |
868 | { | 868 | { |
869 | struct fragment_info *fi; | 869 | struct fragment_info *fi; |
870 | int end = offset + len; | ||
870 | 871 | ||
871 | list_for_each_entry(fi, frag_list, list) { | 872 | list_for_each_entry(fi, frag_list, list) |
872 | if ( ! ((offset > (fi->offset + fi->len - 1)) || | 873 | if (offset < fi->offset + fi->len && end > fi->offset) |
873 | ((offset + len - 1) < fi->offset))) | ||
874 | return 1; | 874 | return 1; |
875 | } | 875 | |
876 | return 0; | 876 | return 0; |
877 | } | 877 | } |
878 | 878 | ||