kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* using sizeof operator
@ 2012-01-22 18:14 Sukrit Sangwan
  2012-01-22 18:27 ` Daniel Baluta
  2012-01-22 18:28 ` Sukrit Sangwan
  0 siblings, 2 replies; 6+ messages in thread
From: Sukrit Sangwan @ 2012-01-22 18:14 UTC (permalink / raw)
  To: kernelnewbies

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 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-01-23 10:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-22 18:14 using sizeof operator Sukrit Sangwan
2012-01-22 18:27 ` Daniel Baluta
     [not found]   ` <CAF5YyJMJN7ZZMuP-K7Bp2W7dVHd8sGeoeK_+1A2ho+FtWD2Fww@mail.gmail.com>
2012-01-22 20:21     ` Daniel Baluta
2012-01-22 18:28 ` Sukrit Sangwan
2012-01-22 19:09   ` Jonathan Neuschäfer
2012-01-23 10:42   ` Bernd Petrovitsch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).