Thread (5 messages) flat view 5 messages, 4 authors, 2012-01-23

using sizeof operator

From: Sukrit Sangwan <hidden>
Date: 2012-01-22 18:14:27

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 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help