[05/12] acpi: checksum: print size_t values using %zd specifier
diff mbox series

Message ID 20180906142001.28381-6-colin.king@canonical.com
State Accepted
Headers show
Series
  • Fix up print format specifiers
Related show

Commit Message

Colin King Sept. 6, 2018, 2:19 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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

Comments

Alex Hung Sept. 6, 2018, 9:38 p.m. UTC | #1
On 2018-09-06 07:19 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/checksum/checksum.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c
> index f475c4e5..8ac019a8 100644
> --- a/src/acpi/checksum/checksum.c
> +++ b/src/acpi/checksum/checksum.c
> @@ -67,10 +67,10 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
>   		if (table->length < sizeof(fwts_acpi_table_rsdp)) {
>   			fwts_failed(fw, LOG_LEVEL_CRITICAL,
>   				"ACPITableCheckSumShortRSDP",
> -				"RSDP was expected to be %d bytes long, "
> -				"got a shortened size of %d bytes.",
> -				(int)sizeof(fwts_acpi_table_rsdp),
> -				(int)table->length);
> +				"RSDP was expected to be %zd bytes long, "
> +				"got a shortened size of %zd bytes.",
> +				sizeof(fwts_acpi_table_rsdp),
> +				table->length);
>   			/* Won't test on a short RSDP */
>   			return;
>   		}
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
ivanhu Sept. 10, 2018, 4:27 a.m. UTC | #2
On 09/06/2018 10:19 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/checksum/checksum.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c
> index f475c4e5..8ac019a8 100644
> --- a/src/acpi/checksum/checksum.c
> +++ b/src/acpi/checksum/checksum.c
> @@ -67,10 +67,10 @@ static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
>  		if (table->length < sizeof(fwts_acpi_table_rsdp)) {
>  			fwts_failed(fw, LOG_LEVEL_CRITICAL,
>  				"ACPITableCheckSumShortRSDP",
> -				"RSDP was expected to be %d bytes long, "
> -				"got a shortened size of %d bytes.",
> -				(int)sizeof(fwts_acpi_table_rsdp),
> -				(int)table->length);
> +				"RSDP was expected to be %zd bytes long, "
> +				"got a shortened size of %zd bytes.",
> +				sizeof(fwts_acpi_table_rsdp),
> +				table->length);
>  			/* Won't test on a short RSDP */
>  			return;
>  		}

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

Patch
diff mbox series

diff --git a/src/acpi/checksum/checksum.c b/src/acpi/checksum/checksum.c
index f475c4e5..8ac019a8 100644
--- a/src/acpi/checksum/checksum.c
+++ b/src/acpi/checksum/checksum.c
@@ -67,10 +67,10 @@  static void checksum_rsdp(fwts_framework *fw, fwts_acpi_table_info *table)
 		if (table->length < sizeof(fwts_acpi_table_rsdp)) {
 			fwts_failed(fw, LOG_LEVEL_CRITICAL,
 				"ACPITableCheckSumShortRSDP",
-				"RSDP was expected to be %d bytes long, "
-				"got a shortened size of %d bytes.",
-				(int)sizeof(fwts_acpi_table_rsdp),
-				(int)table->length);
+				"RSDP was expected to be %zd bytes long, "
+				"got a shortened size of %zd bytes.",
+				sizeof(fwts_acpi_table_rsdp),
+				table->length);
 			/* Won't test on a short RSDP */
 			return;
 		}