Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1734220

RE: [PATCH] net_sched: use explicit size of struct tcmsg, remove need to declare tcm

From David Laight <David.Laight@ACULAB.COM>
Newsgroups linux.kernel
Subject RE: [PATCH] net_sched: use explicit size of struct tcmsg, remove need to declare tcm
Date 2017-09-18 17:20 +0200
Message-ID <ur603-7Z6-39@gated-at.bofh.it> (permalink)
References <ur2IO-5LK-3@gated-at.bofh.it> <ur3bP-6bT-1@gated-at.bofh.it> <ur5Qm-7VK-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] net_sched: use explicit size of struct tcmsg, remove need to declare tcm Colin King <colin.king@canonical.com> - 2017-09-18 13:50 +0200
  RE: [PATCH] net_sched: use explicit size of struct tcmsg, remove  need to declare tcm David Laight <David.Laight@ACULAB.COM> - 2017-09-18 14:20 +0200
    Re: [PATCH] net_sched: use explicit size of struct tcmsg, remove  need to declare tcm Eric Dumazet <eric.dumazet@gmail.com> - 2017-09-18 17:10 +0200
      RE: [PATCH] net_sched: use explicit size of struct tcmsg, remove  need to declare tcm David Laight <David.Laight@ACULAB.COM> - 2017-09-18 17:20 +0200
  Re: [PATCH] net_sched: use explicit size of struct tcmsg, remove  need to declare tcm David Miller <davem@davemloft.net> - 2017-09-19 02:00 +0200

csiph-web