On Thu, Mar 16, 2017 at 04:38:27AM +0300, Dmitry V. Levin wrote:
> On Thu, Mar 16, 2017 at 01:01:40AM +0300, Victor Krapivensky wrote:
> > * xlat/usagewho.in: Add values for existing values, add RUSAGE_THREAD.
> > * tests/getrusage.c: Test decoding of RUSAGE_THREAD.
> > ---
> >  tests/getrusage.c | 31 +++++++++++++++++++++++++------
> >  xlat/usagewho.in  |  7 ++++---
> >  2 files changed, 29 insertions(+), 9 deletions(-)
> [...]
> > +int
> > +main(void)
> > +{
> > +   struct rusage *const usage = tail_alloc(sizeof(struct rusage));
> 
> The idiom is
>       struct rusage *const usage = tail_alloc(sizeof(*usage));

I've just introduced a couple of new macros to make it less error-prone
so the idiom has changed to

        TAIL_ALLOC_OBJECT_CONST_PTR(struct rusage, usage);


-- 
ldv

Attachment: pgpFjkJ2Czkm2.pgp
Description: PGP signature

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to