[24/27] uefi: uefirtauthvar: rename argument attibutes to var_attributes
diff mbox series

Message ID 20180815131129.24146-25-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/uefirtauthvar/uefirtauthvar.c | 4 ++--
 1 file changed, 2 insertions(+), 2 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/uefirtauthvar/uefirtauthvar.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/uefi/uefirtauthvar/uefirtauthvar.c b/src/uefi/uefirtauthvar/uefirtauthvar.c
> index c59b0879..606bead7 100644
> --- a/src/uefi/uefirtauthvar/uefirtauthvar.c
> +++ b/src/uefi/uefirtauthvar/uefirtauthvar.c
> @@ -56,7 +56,7 @@ static uint16_t variablenametest[] = {'A', 'u', 't', 'h', 'V', 'a', 'r', 'T', 'e
>   
>   static long setvar(
>   	EFI_GUID *guid,
> -	uint32_t attributes,
> +	uint32_t var_attributes,
>   	uint64_t datasize,
>   	void *data,
>   	uint64_t *status)
> @@ -66,7 +66,7 @@ static long setvar(
>   
>   	setvariable.VariableName = variablenametest;
>   	setvariable.VendorGuid = guid;
> -	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/uefirtauthvar/uefirtauthvar.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/uefi/uefirtauthvar/uefirtauthvar.c b/src/uefi/uefirtauthvar/uefirtauthvar.c
> index c59b0879..606bead7 100644
> --- a/src/uefi/uefirtauthvar/uefirtauthvar.c
> +++ b/src/uefi/uefirtauthvar/uefirtauthvar.c
> @@ -56,7 +56,7 @@ static uint16_t variablenametest[] = {'A', 'u', 't', 'h', 'V', 'a', 'r', 'T', 'e
>  
>  static long setvar(
>  	EFI_GUID *guid,
> -	uint32_t attributes,
> +	uint32_t var_attributes,
>  	uint64_t datasize,
>  	void *data,
>  	uint64_t *status)
> @@ -66,7 +66,7 @@ static long setvar(
>  
>  	setvariable.VariableName = variablenametest;
>  	setvariable.VendorGuid = guid;
> -	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/uefirtauthvar/uefirtauthvar.c b/src/uefi/uefirtauthvar/uefirtauthvar.c
index c59b0879..606bead7 100644
--- a/src/uefi/uefirtauthvar/uefirtauthvar.c
+++ b/src/uefi/uefirtauthvar/uefirtauthvar.c
@@ -56,7 +56,7 @@  static uint16_t variablenametest[] = {'A', 'u', 't', 'h', 'V', 'a', 'r', 'T', 'e
 
 static long setvar(
 	EFI_GUID *guid,
-	uint32_t attributes,
+	uint32_t var_attributes,
 	uint64_t datasize,
 	void *data,
 	uint64_t *status)
@@ -66,7 +66,7 @@  static long setvar(
 
 	setvariable.VariableName = variablenametest;
 	setvariable.VendorGuid = guid;
-	setvariable.Attributes = attributes;
+	setvariable.Attributes = var_attributes;
 	setvariable.DataSize = datasize;
 	setvariable.Data = data;
 	setvariable.status = status;