Messages in this thread | | | From | David Laight <> | Subject | RE: [PATCH] net_sched: use explicit size of struct tcmsg, remove need to declare tcm | Date | Mon, 18 Sep 2017 15:10:34 +0000 |
| |
From: Eric Dumazet > Sent: 18 September 2017 16:01 ... > > > - err = nlmsg_parse(nlh, sizeof(*tcm), tca, TCA_MAX, NULL, NULL); > > > + err = nlmsg_parse(nlh, sizeof(struct tcmsg), tca, TCA_MAX, NULL, NULL); > > > > Would sizeof(*nlmsg_data(nlh)) be cleaner?? > > Not really, since > > static inline void *nlmsg_data(const struct nlmsghdr *nlh)
I thought about that after posting :-(
David
| |