Alexander Aring wrote:
> static inline int lowpan_fetch_skb(struct sk_buff *skb,

Looks nice. It's not terribly efficient to check the length each time,
but then 6LoWPAN isn't meant to be a speed demon :-) Since you have a
lot of long sequences of such operations, maybe don't return an errno
code here but just a bool. Then you can

        bool fail;

        ...
                fail = lowpan_fetch_skb(skb, d, 2);
                fail |= lowpan_fetch_skb(skb, d, 2);
                break;
        ...
        if (fail)
                return -EINVAL;
        ...

- Werner

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to