Commit 2e2173df authored by Stefan Richter's avatar Stefan Richter

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: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 01590d20
...@@ -867,12 +867,12 @@ static u16 ether1394_parse_encap(struct sk_buff *skb, struct net_device *dev, ...@@ -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) static int fragment_overlap(struct list_head *frag_list, int offset, int len)
{ {
struct fragment_info *fi; struct fragment_info *fi;
int end = offset + len;
list_for_each_entry(fi, frag_list, list) { list_for_each_entry(fi, frag_list, list)
if ( ! ((offset > (fi->offset + fi->len - 1)) || if (offset < fi->offset + fi->len && end > fi->offset)
((offset + len - 1) < fi->offset)))
return 1; return 1;
}
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment