[LTP] [PATCH v9 4/4] Extend ioctl02 to test termio and termios
Cyril Hrubis
chrubis@suse.cz
Thu Nov 2 14:26:17 CET 2023
Hi!
> So I'm honestly not sure whether any of this is better than just making it a
> macro or maybe I don't understand your suggestion.
And that what macros are for, avoiding repetitive parameters, my
soulution would be to add a macro that just prepares the parameters
for the function and then keep all the code in a function, i.e.
#define CMP_ATTR(term_exp, term, attr) \
cmp_attr((term_exp)->attr, (term)->attr, #attr)
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list