using sizeof operator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux