lib: fwts_acpi_tables: remove redundant initialization to oem_tbl_id
diff mbox series

Message ID 20200113113159.165839-1-colin.king@canonical.com
State Accepted
Headers show
Series
  • lib: fwts_acpi_tables: remove redundant initialization to oem_tbl_id
Related show

Commit Message

Colin Ian King Jan. 13, 2020, 11:31 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer oem_tbl_id is being initialized with a value that is never read
and it is being re-assigned later. The initialization is redundant and
can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_acpi_tables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alex Hung Jan. 13, 2020, 6:12 p.m. UTC | #1
On 2020-01-13 4:31 a.m., Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer oem_tbl_id is being initialized with a value that is never read
> and it is being re-assigned later. The initialization is redundant and
> can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_acpi_tables.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index fe07edd5..3749c56a 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -970,7 +970,7 @@ void fwts_acpi_fixup_addr_from_fadt(
>  static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
>  {
>  	int i, j, count;
> -	char *oem_tbl_id = "FWTSIDXX";
> +	char *oem_tbl_id;
>  	fwts_acpi_table_info *table;
>  	fwts_acpi_table_rsdp *rsdp = NULL;
>  	fwts_acpi_table_fadt *fadt = NULL;
> 

Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Jan. 14, 2020, 4:19 a.m. UTC | #2
On 1/13/20 7:31 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer oem_tbl_id is being initialized with a value that is never read
> and it is being re-assigned later. The initialization is redundant and
> can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_acpi_tables.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index fe07edd5..3749c56a 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -970,7 +970,7 @@ void fwts_acpi_fixup_addr_from_fadt(
>  static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
>  {
>  	int i, j, count;
> -	char *oem_tbl_id = "FWTSIDXX";
> +	char *oem_tbl_id;
>  	fwts_acpi_table_info *table;
>  	fwts_acpi_table_rsdp *rsdp = NULL;
>  	fwts_acpi_table_fadt *fadt = NULL;
> 

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

Patch
diff mbox series

diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
index fe07edd5..3749c56a 100644
--- a/src/lib/src/fwts_acpi_tables.c
+++ b/src/lib/src/fwts_acpi_tables.c
@@ -970,7 +970,7 @@  void fwts_acpi_fixup_addr_from_fadt(
 static int fwts_acpi_load_tables_fixup(fwts_framework *fw)
 {
 	int i, j, count;
-	char *oem_tbl_id = "FWTSIDXX";
+	char *oem_tbl_id;
 	fwts_acpi_table_info *table;
 	fwts_acpi_table_rsdp *rsdp = NULL;
 	fwts_acpi_table_fadt *fadt = NULL;