Guillaume Chazarain wrote:
Stephen Hemminger wrote :
- struct netem_skb_cb *cb = (struct netem_skb_cb *)skb->cb;
+ /* We don't fill cb now as skb_unshare() may invalidate it */
+ struct netem_skb_cb *cb = NULL;
Would rather leave it unitialized, rather than setting to NULL.
I find that strange. If someone mistakenly uses cb before it is
initialized it could be hard
to figure out why some memory is corrupted. But by initializing cb to
NULL, it will
always trigger an Oops, so it will be easier to debug in this case.
Cheers.
Gcc will complain if variable is used before initialized, and I would
rather see it at compile time than runtime.
-
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