From cec59d79c94ee4ec579764d0a6e934e67e11cc94 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Mon, 31 Jul 2023 19:48:38 -0400 Subject: [PATCH] Minor optimization: Don't set parent's "don't cache" to match child Don't set the parent layer's "don't cache" flag to match the child. `emax_reached()` already does the same thing so doing it again is unnecessary. --- libclamav/matcher.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libclamav/matcher.c b/libclamav/matcher.c index b0e4d20ccb..446144b950 100644 --- a/libclamav/matcher.c +++ b/libclamav/matcher.c @@ -803,10 +803,6 @@ cl_error_t cli_scan_desc(int desc, cli_ctx *ctx, cli_file_t ftype, bool filetype status = cli_scan_fmap(ctx, ftype, filetype_only, ftoffset, acmode, acres, NULL); - map->dont_cache_flag = ctx->fmap->dont_cache_flag; /* Set the parent layer's "don't cache" flag to match the child. - TODO: This may not be needed since `emax_reached()` should've - already done that for us. */ - (void)cli_recursion_stack_pop(ctx); /* Restore the parent fmap */ done: