ACK: [PATCH] bios: smm: remove redundant variable n
Alex Hung
alex.hung at canonical.com
Wed Sep 22 19:08:32 UTC 2021
On 2021-09-22 4:22 a.m., Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> The variable n is being assigned but is not read afterwards. The
> variable can be removed. Cleans up cppcheck style warnings.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/bios/smm/smm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/bios/smm/smm.c b/src/bios/smm/smm.c
> index 24ca126e..5b2eb2cc 100644
> --- a/src/bios/smm/smm.c
> +++ b/src/bios/smm/smm.c
> @@ -58,14 +58,13 @@ static int smm_test0(fwts_framework *fw)
> {
> uint8_t config[256];
> bool passed = true;
> - ssize_t n;
> int fd;
>
> if ((fd = open(FWTS_INTEL_HOST_PATH, O_RDONLY)) < 0) {
> fwts_log_warning(fw, "Could not open PCI HOST bridge config data\n");
> return FWTS_ERROR;
> }
> - if ((n = read(fd, config, sizeof(config))) < 0) {
> + if (read(fd, config, sizeof(config)) < 0) {
> fwts_log_warning(fw, "Could not read PCI HOST bridge config data\n");
> (void)close(fd);
> return FWTS_ERROR;
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list