[26/27] coreboot: clog: rename list 'clog' to avoid name shadowing
diff mbox series

Message ID 20180815131129.24146-27-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>

Rename the list 'clog' to 'clog_list' to avoid name shadowing
confusion with various functions that use clog as an argument
too.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/coreboot/clog/clog.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 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>
> 
> Rename the list 'clog' to 'clog_list' to avoid name shadowing
> confusion with various functions that use clog as an argument
> too.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/coreboot/clog/clog.c | 11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/src/coreboot/clog/clog.c b/src/coreboot/clog/clog.c
> index 5feca313..6f5e38ce 100644
> --- a/src/coreboot/clog/clog.c
> +++ b/src/coreboot/clog/clog.c
> @@ -25,7 +25,7 @@
>   #include <sys/stat.h>
>   #include <unistd.h>
>   
> -static fwts_list *clog;
> +static fwts_list *clog_list;
>   
>   static int clog_init(fwts_framework *fw)
>   {
> @@ -34,9 +34,8 @@ static int clog_init(fwts_framework *fw)
>   		return FWTS_SKIP;
>   	}
>   
> -	clog = fwts_clog_read(fw);
> -
> -	if (clog == NULL) {
> +	clog_list = fwts_clog_read(fw);
> +	if (clog_list == NULL) {
>   		fwts_log_error(fw, "Cannot read coreboot log.");
>   		return FWTS_ERROR;
>   	}
> @@ -47,7 +46,7 @@ static int clog_deinit(fwts_framework *fw)
>   {
>   	FWTS_UNUSED(fw);
>   
> -	fwts_clog_free(clog);
> +	fwts_clog_free(clog_list);
>   
>   	return FWTS_OK;
>   }
> @@ -61,7 +60,7 @@ static int clog_test1(fwts_framework *fw)
>   {
>   	int errors = 0;
>   
> -	if (fwts_clog_firmware_check(fw, clog_progress, clog, &errors)) {
> +	if (fwts_clog_firmware_check(fw, clog_progress, clog_list, &errors)) {
>   		fwts_log_error(fw, "Error parsing coreboot log.");
>   		return FWTS_ERROR;
>   	}
> 



Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Aug. 16, 2018, 9:21 a.m. UTC | #2
On 08/15/2018 09:11 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Rename the list 'clog' to 'clog_list' to avoid name shadowing
> confusion with various functions that use clog as an argument
> too.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/coreboot/clog/clog.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/src/coreboot/clog/clog.c b/src/coreboot/clog/clog.c
> index 5feca313..6f5e38ce 100644
> --- a/src/coreboot/clog/clog.c
> +++ b/src/coreboot/clog/clog.c
> @@ -25,7 +25,7 @@
>  #include <sys/stat.h>
>  #include <unistd.h>
>  
> -static fwts_list *clog;
> +static fwts_list *clog_list;
>  
>  static int clog_init(fwts_framework *fw)
>  {
> @@ -34,9 +34,8 @@ static int clog_init(fwts_framework *fw)
>  		return FWTS_SKIP;
>  	}
>  
> -	clog = fwts_clog_read(fw);
> -
> -	if (clog == NULL) {
> +	clog_list = fwts_clog_read(fw);
> +	if (clog_list == NULL) {
>  		fwts_log_error(fw, "Cannot read coreboot log.");
>  		return FWTS_ERROR;
>  	}
> @@ -47,7 +46,7 @@ static int clog_deinit(fwts_framework *fw)
>  {
>  	FWTS_UNUSED(fw);
>  
> -	fwts_clog_free(clog);
> +	fwts_clog_free(clog_list);
>  
>  	return FWTS_OK;
>  }
> @@ -61,7 +60,7 @@ static int clog_test1(fwts_framework *fw)
>  {
>  	int errors = 0;
>  
> -	if (fwts_clog_firmware_check(fw, clog_progress, clog, &errors)) {
> +	if (fwts_clog_firmware_check(fw, clog_progress, clog_list, &errors)) {
>  		fwts_log_error(fw, "Error parsing coreboot log.");
>  		return FWTS_ERROR;
>  	}

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

Patch
diff mbox series

diff --git a/src/coreboot/clog/clog.c b/src/coreboot/clog/clog.c
index 5feca313..6f5e38ce 100644
--- a/src/coreboot/clog/clog.c
+++ b/src/coreboot/clog/clog.c
@@ -25,7 +25,7 @@ 
 #include <sys/stat.h>
 #include <unistd.h>
 
-static fwts_list *clog;
+static fwts_list *clog_list;
 
 static int clog_init(fwts_framework *fw)
 {
@@ -34,9 +34,8 @@  static int clog_init(fwts_framework *fw)
 		return FWTS_SKIP;
 	}
 
-	clog = fwts_clog_read(fw);
-
-	if (clog == NULL) {
+	clog_list = fwts_clog_read(fw);
+	if (clog_list == NULL) {
 		fwts_log_error(fw, "Cannot read coreboot log.");
 		return FWTS_ERROR;
 	}
@@ -47,7 +46,7 @@  static int clog_deinit(fwts_framework *fw)
 {
 	FWTS_UNUSED(fw);
 
-	fwts_clog_free(clog);
+	fwts_clog_free(clog_list);
 
 	return FWTS_OK;
 }
@@ -61,7 +60,7 @@  static int clog_test1(fwts_framework *fw)
 {
 	int errors = 0;
 
-	if (fwts_clog_firmware_check(fw, clog_progress, clog, &errors)) {
+	if (fwts_clog_firmware_check(fw, clog_progress, clog_list, &errors)) {
 		fwts_log_error(fw, "Error parsing coreboot log.");
 		return FWTS_ERROR;
 	}