On Sat, 29 Jul 2006, Masahide NAKAMURA wrote:

> -             hdr_len = ip6_find_1stfragopt(skb, &prevhdr);
> +             if (x->type->place_find)
> +                     hdr_len = x->type->place_find(x, skb, &prevhdr);
> +             else
> +                     hdr_len = ip6_find_1stfragopt(skb, &prevhdr);

What about encapsulating this like:

static inline int hdr_offset(...)
{
        if (x->type->place_find)
                return x->type->place_find(x, skb, &prevhdr);
        else
                return ip6_find_1stfragopt(skb, &prevhdr);
}

Maybe also change the naming of ->place_find to ->hdr_offset



- James
-- 
James Morris
<[EMAIL PROTECTED]>
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to