Skip to content

Commit

Permalink
Minor optimization: Don't set parent's "don't cache" to match child
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
candrews committed Jul 31, 2023
1 parent 35ff4fe commit cec59d7
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions libclamav/matcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cec59d7

Please sign in to comment.