ACK: [PATCH] dmi: dmicheck: remove redundant check on boolean advice_given
Alex Hung
alex.hung at canonical.com
Mon Apr 17 17:31:22 UTC 2017
On 2017-04-13 03:19 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The boolean advice_given is always false, so the !advice_given is
> always true. We can remove this redundant variable and check.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/dmi/dmicheck/dmicheck.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
> index 49b523db..25fc678c 100644
> --- a/src/dmi/dmicheck/dmicheck.c
> +++ b/src/dmi/dmicheck/dmicheck.c
> @@ -990,7 +990,6 @@ static void dmicheck_entry(fwts_framework *fw,
> uint32_t failed_count = fw->minor_tests.failed;
> int battery_count;
> int ret;
> - bool advice_given = false;
>
> switch (hdr->type) {
> case 0: /* 7.1 */
> @@ -1652,7 +1651,7 @@ static void dmicheck_entry(fwts_framework *fw,
> }
> if (fw->minor_tests.failed == failed_count)
> fwts_passed(fw, "Entry @ 0x%8.8" PRIx32 " '%s'", addr, table);
> - else if (!advice_given && hdr->type <= 42)
> + else if (hdr->type <= 42)
> fwts_advice(fw,
> "It may be worth checking against section 7.%" PRId8 " of the "
> "System Management BIOS (SMBIOS) Reference Specification "
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list