[LTP] [PATCH 1/2] lib: Add safe timerfd macros

Petr Vorel pvorel@suse.cz
Thu Mar 5 12:54:13 CET 2020


Hi Cyril,

> > > I forgot to add one more thing: making the return value checks more
> > > pedantic would also be nice.
> > I guess you mean if (rval == -1). Sure, I'll do that.

> Actually for the sake of SAFE_MACROS() it makes sense to fail unless we
> got a valid result. So for > 0 for timerfd_create() 
I guess you mean fd < 0 here (no " > 0), as it's a file descriptor.
> and != 0 for
> timerfd_settime() and timerfd_gettime().

Kind regards,
Petr


More information about the ltp mailing list