[25/27] uefi: uefirtvariable: rename argument attibutes to var_attributes
diff mbox series

Message ID 20180815131129.24146-26-colin.king@canonical.com
State Accepted
Headers show
Series
  • [01/27] lib: fwts_framework: ensure src pointer is const
Related show

Commit Message

Colin King Aug. 15, 2018, 1:11 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Argument attibutes shadows the global variable name attibutes
so rename it to var_attributes to avoid any variable shadowing
confusion

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/uefi/uefirtvariable/uefirtvariable.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Alex Hung Aug. 15, 2018, 6:12 p.m. UTC | #1
On 2018-08-15 06:11 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Argument attibutes shadows the global variable name attibutes
> so rename it to var_attributes to avoid any variable shadowing
> confusion
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/uefi/uefirtvariable/uefirtvariable.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
> index 552790e0..c3230868 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -873,7 +873,7 @@ err:
>   
>   static int setvariable_insertvariable(
>   	fwts_framework *fw,
> -	const uint32_t attributes,
> +	const uint32_t var_attributes,
>   	const uint64_t datasize,
>   	uint16_t *varname,
>   	EFI_GUID *gtestguid,
> @@ -892,7 +892,7 @@ static int setvariable_insertvariable(
>   
>   	setvariable.VariableName = varname;
>   	setvariable.VendorGuid = gtestguid;
> -	setvariable.Attributes = attributes;
> +	setvariable.Attributes = var_attributes;
>   	setvariable.DataSize = datasize;
>   	setvariable.Data = data;
>   	setvariable.status = &status;
> @@ -1035,7 +1035,7 @@ static int setvariable_checkvariable_notfound(
>   
>   static int setvariable_invalidattr(
>   	fwts_framework *fw,
> -	const uint32_t attributes,
> +	const uint32_t var_attributes,
>   	const uint64_t datasize,
>   	uint16_t *varname,
>   	EFI_GUID *gtestguid,
> @@ -1052,7 +1052,7 @@ static int setvariable_invalidattr(
>   
>   	setvariable.VariableName = varname;
>   	setvariable.VendorGuid = gtestguid;
> -	setvariable.Attributes = attributes;
> +	setvariable.Attributes = var_attributes;
>   	setvariable.DataSize = datasize;
>   	setvariable.Data = data;
>   	setvariable.status = &status;
> 



Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Aug. 16, 2018, 9:20 a.m. UTC | #2
On 08/15/2018 09:11 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Argument attibutes shadows the global variable name attibutes
> so rename it to var_attributes to avoid any variable shadowing
> confusion
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/uefi/uefirtvariable/uefirtvariable.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
> index 552790e0..c3230868 100644
> --- a/src/uefi/uefirtvariable/uefirtvariable.c
> +++ b/src/uefi/uefirtvariable/uefirtvariable.c
> @@ -873,7 +873,7 @@ err:
>  
>  static int setvariable_insertvariable(
>  	fwts_framework *fw,
> -	const uint32_t attributes,
> +	const uint32_t var_attributes,
>  	const uint64_t datasize,
>  	uint16_t *varname,
>  	EFI_GUID *gtestguid,
> @@ -892,7 +892,7 @@ static int setvariable_insertvariable(
>  
>  	setvariable.VariableName = varname;
>  	setvariable.VendorGuid = gtestguid;
> -	setvariable.Attributes = attributes;
> +	setvariable.Attributes = var_attributes;
>  	setvariable.DataSize = datasize;
>  	setvariable.Data = data;
>  	setvariable.status = &status;
> @@ -1035,7 +1035,7 @@ static int setvariable_checkvariable_notfound(
>  
>  static int setvariable_invalidattr(
>  	fwts_framework *fw,
> -	const uint32_t attributes,
> +	const uint32_t var_attributes,
>  	const uint64_t datasize,
>  	uint16_t *varname,
>  	EFI_GUID *gtestguid,
> @@ -1052,7 +1052,7 @@ static int setvariable_invalidattr(
>  
>  	setvariable.VariableName = varname;
>  	setvariable.VendorGuid = gtestguid;
> -	setvariable.Attributes = attributes;
> +	setvariable.Attributes = var_attributes;
>  	setvariable.DataSize = datasize;
>  	setvariable.Data = data;
>  	setvariable.status = &status;

Acked-by: Ivan Hu <ivan.hu@canonical.com>

Patch
diff mbox series

diff --git a/src/uefi/uefirtvariable/uefirtvariable.c b/src/uefi/uefirtvariable/uefirtvariable.c
index 552790e0..c3230868 100644
--- a/src/uefi/uefirtvariable/uefirtvariable.c
+++ b/src/uefi/uefirtvariable/uefirtvariable.c
@@ -873,7 +873,7 @@  err:
 
 static int setvariable_insertvariable(
 	fwts_framework *fw,
-	const uint32_t attributes,
+	const uint32_t var_attributes,
 	const uint64_t datasize,
 	uint16_t *varname,
 	EFI_GUID *gtestguid,
@@ -892,7 +892,7 @@  static int setvariable_insertvariable(
 
 	setvariable.VariableName = varname;
 	setvariable.VendorGuid = gtestguid;
-	setvariable.Attributes = attributes;
+	setvariable.Attributes = var_attributes;
 	setvariable.DataSize = datasize;
 	setvariable.Data = data;
 	setvariable.status = &status;
@@ -1035,7 +1035,7 @@  static int setvariable_checkvariable_notfound(
 
 static int setvariable_invalidattr(
 	fwts_framework *fw,
-	const uint32_t attributes,
+	const uint32_t var_attributes,
 	const uint64_t datasize,
 	uint16_t *varname,
 	EFI_GUID *gtestguid,
@@ -1052,7 +1052,7 @@  static int setvariable_invalidattr(
 
 	setvariable.VariableName = varname;
 	setvariable.VendorGuid = gtestguid;
-	setvariable.Attributes = attributes;
+	setvariable.Attributes = var_attributes;
 	setvariable.DataSize = datasize;
 	setvariable.Data = data;
 	setvariable.status = &status;