[PATCH] bios: mtrr: make skiperror a boolean

IvanHu ivan.hu at canonical.com
Thu Dec 13 09:44:50 UTC 2012


On 12/07/2012 08:22 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Make skiperror a bool type.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/bios/mtrr/mtrr.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/bios/mtrr/mtrr.c b/src/bios/mtrr/mtrr.c
> index eb8fbbf..6dbc8e2 100644
> --- a/src/bios/mtrr/mtrr.c
> +++ b/src/bios/mtrr/mtrr.c
> @@ -263,7 +263,7 @@ static int validate_iomem(fwts_framework *fw)
>   		int type, type_must, type_mustnot;
>   		char *c, *c2;
>   		int i;
> -		int skiperror = 0;
> +		bool skiperror = false;
>
>   		if (fgets(buffer, 4095, file)==NULL)
>   			break;
> @@ -321,14 +321,14 @@ static int validate_iomem(fwts_framework *fw)
>   				c2, cache_to_string(type & type_mustnot));
>   			fwts_tag_failed(fw, FWTS_TAG_BIOS);
>   			if (type_must == UNCACHED)
> -				skiperror = 1;
> +				skiperror = true;
>   		}
>
>   		if (type & DEFAULT) {
>   			type |= UNCACHED;
>   			type &= ~DEFAULT;
>   		}
> -		if ((type & type_must)!=type_must && skiperror==0) {
> +		if (((type & type_must) != type_must) && !skiperror) {
>   			failed++;
>   			fwts_failed(fw, LOG_LEVEL_MEDIUM,
>   				"MTRRLackingAttr",
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>



More information about the fwts-devel mailing list