1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

testcrypt: remove some pointless macros.

I just happened to notice ARG1 and ARGN in the code that builds the
dispatch table in process_line(), which aren't used at all, because
they date from a previous version of the testcrypt-func.h macro
system. They were supposed to be replaced everywhere with the unified
ARG.

So why didn't the missing definition of ARG break anything? Because
ARG only ever appears in the variadic part of a FUNC_INNER call - and
for this particular trawl of testcrypt-func.h, the variadic part isn't
ever used in the macro expansion in the first place. So there's no
need to define ARG and VOID to anything at all, not even the empty
string.
This commit is contained in:
Simon Tatham 2022-10-30 08:54:16 +00:00
parent f9a8213d95
commit 79b1cb2267

View File

@ -1613,13 +1613,8 @@ static void process_line(BinarySource *in, strbuf *out)
#define FUNC_INNER(outtype, fname, realname, ...) \
DISPATCH_INTERNAL(#fname,handle_##fname);
#define ARG1(type, arg)
#define ARGN(type, arg)
#define VOID
#include "testcrypt-func.h"
#undef FUNC_INNER
#undef ARG
#undef VOID
#undef DISPATCH_INTERNAL