* Michael Buesch <[EMAIL PROTECTED]> 2006-08-24 19:09
> On Thursday 24 August 2006 18:07, Johannes Berg wrote:
> > +   pkt = alloc_skb(framelen, GFP_KERNEL);
> 
> if (!pkt)
>       return -ENOMEM;
> 
> > +   pktdata = skb_put(pkt, framelen);
> > +   memcpy(pktdata, frame, framelen);
> 
> having two variables with almost the same name seems
> confusing to me. What about removing void *pktdata; and
> doing the following instead of the two lines above?
> 
> memcpy(skb_put(pkt, framelen), frame, framelen);
> 
> That is also how it's done in lots of other networking code.

You might want to use 'skb' instead of 'pkt', everyone
has got used to it.
-
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