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

Cyril Hrubis chrubis@suse.cz
Thu Mar 5 11:11:23 CET 2020


Hi!
> > 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() and != 0 for
timerfd_settime() and timerfd_gettime().

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list