using sizeof operator
Sukrit Sangwan
sukritsangwan at gmail.com
Sun Jan 22 13:14:27 EST 2012
There are instances in the code where sizeof(*ptr) is used. e.g.
in net/802/garp.c
const struct garp_msg_hdr *gm;
if (!pskb_may_pull(skb, sizeof(*gm)))
return -1;
i want to ask is there any sense in using sizeof(struct garp_msg_hdr)
instead of sizeof(*gm) in the above example.
Thanks
--
Sukrit Sangwan
IIT Roorkee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120122/2d767a90/attachment.html
More information about the Kernelnewbies
mailing list