diff mbox series

[03/12] acpi: acpitables: use PRIu32 format specifier for a uint32_t type

Message ID 20180906142001.28381-4-colin.king@canonical.com
State Accepted
Headers show
Series Fix up print format specifiers | expand

Commit Message

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

Don't use %d, use PRIu32 for uint32_t type

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/acpitables/acpitables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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>
> 
> Don't use %d, use PRIu32 for uint32_t type
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/acpitables/acpitables.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/acpi/acpitables/acpitables.c b/src/acpi/acpitables/acpitables.c
> index c32b42c0..813c3073 100644
> --- a/src/acpi/acpitables/acpitables.c
> +++ b/src/acpi/acpitables/acpitables.c
> @@ -91,7 +91,7 @@ static int acpi_table_check_test1(fwts_framework *fw)
>   		 */
>   		if (hdr->length < sizeof(fwts_acpi_table_header)) {
>   			fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableHdrShort",
> -				"ACPI Table %s is too short, only %d bytes long. Further "
> +				"ACPI Table %s is too short, only %" PRIu32 " bytes long. Further "
>   				"header checks will be omitted.", name, hdr->length);
>   			continue;
>   		}	
> 


Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu Sept. 10, 2018, 4:23 a.m. UTC | #2
On 09/06/2018 10:19 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't use %d, use PRIu32 for uint32_t type
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/acpitables/acpitables.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/acpi/acpitables/acpitables.c b/src/acpi/acpitables/acpitables.c
> index c32b42c0..813c3073 100644
> --- a/src/acpi/acpitables/acpitables.c
> +++ b/src/acpi/acpitables/acpitables.c
> @@ -91,7 +91,7 @@ static int acpi_table_check_test1(fwts_framework *fw)
>  		 */
>  		if (hdr->length < sizeof(fwts_acpi_table_header)) {
>  			fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableHdrShort",
> -				"ACPI Table %s is too short, only %d bytes long. Further "
> +				"ACPI Table %s is too short, only %" PRIu32 " bytes long. Further "
>  				"header checks will be omitted.", name, hdr->length);
>  			continue;
>  		}
Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox series

Patch

diff --git a/src/acpi/acpitables/acpitables.c b/src/acpi/acpitables/acpitables.c
index c32b42c0..813c3073 100644
--- a/src/acpi/acpitables/acpitables.c
+++ b/src/acpi/acpitables/acpitables.c
@@ -91,7 +91,7 @@  static int acpi_table_check_test1(fwts_framework *fw)
 		 */
 		if (hdr->length < sizeof(fwts_acpi_table_header)) {
 			fwts_failed(fw, LOG_LEVEL_HIGH, "ACPITableHdrShort",
-				"ACPI Table %s is too short, only %d bytes long. Further "
+				"ACPI Table %s is too short, only %" PRIu32 " bytes long. Further "
 				"header checks will be omitted.", name, hdr->length);
 			continue;
 		}