[LTP] [PATCH] metadata: Ignore system macros
Richard Palethorpe
rpalethorpe@suse.de
Fri Nov 5 15:24:01 CET 2021
Hello,
Cyril Hrubis <chrubis@suse.cz> writes:
> Ingore all macros that start with underscore. Unless we do that we get
> several thousands of __NR_foo macros and the hash table cannot keep up.
>
> Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
> metadata/metaparse.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/metadata/metaparse.c b/metadata/metaparse.c
> index b38550550..f71d8628d 100644
> --- a/metadata/metaparse.c
> +++ b/metadata/metaparse.c
> @@ -624,6 +624,9 @@ static void parse_macro(FILE *f)
>
> macro_get_val(f, val, sizeof(val));
>
> + if (name[0] == '_')
> + return;
> +
> ENTRY e = {
> .key = strdup(name),
> .data = strdup(val),
> --
> 2.32.0
--
Thank you,
Richard.
More information about the ltp
mailing list