[LTP] [PATCH v9 4/4] Extend ioctl02 to test termio and termios

Marius Kittler mkittler@suse.de
Thu Nov 2 16:26:39 CET 2023


Am Donnerstag, 2. November 2023, 14:26:17 CET schrieb Cyril Hrubis:
> 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)

That makes sense and turned out to be a very good suggestion, indeed. I 
implemented this change and could even apply it to the other macro (after a 
bit of simplification). I pushed this change as a new patch set because the 
preceding patches of this one have already been merged.




More information about the ltp mailing list