qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 11/14] contrib/plugins/cache.c: Remove redundant check of l2_


From: Richard Henderson
Subject: Re: [PATCH 11/14] contrib/plugins/cache.c: Remove redundant check of l2_access
Date: Tue, 30 Jul 2024 08:30:28 +1000
User-agent: Mozilla Thunderbird

On 7/30/24 00:44, Alex Bennée wrote:
From: Peter Maydell<peter.maydell@linaro.org>

In append_stats_line(), we have an expression
    l2_access ? l2_miss_rate : 0.0
But this is inside an if (l2_access && l2_misses) { ... } block,
so Coverity points out that the false part of the ?: is dead code.

Remove the unnecessary test.

Resolves: Coverity CID 1522458
Signed-off-by: Peter Maydell<peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé<philmd@linaro.org>
Message-Id:<20240725164851.1930964-1-peter.maydell@linaro.org>
Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
---
  contrib/plugins/cache.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]