ACK: [PATCH 15/26] acpi: wmi: make size a size_t
Alex Hung
alex.hung at canonical.com
Mon Oct 15 08:27:52 UTC 2012
On 10/15/2012 04:32 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Make size a size_t and use appropriate printf format specifiers
> for this.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/acpi/wmi/wmi.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/src/acpi/wmi/wmi.c b/src/acpi/wmi/wmi.c
> index 588f8cf..578abe9 100644
> --- a/src/acpi/wmi/wmi.c
> +++ b/src/acpi/wmi/wmi.c
> @@ -112,9 +112,9 @@ static char *wmi_wdg_flags_to_text(const fwts_wmi_flags flags)
> }
>
> static void wmi_parse_wdg_data(fwts_framework *fw,
> - const int size, const uint8_t *wdg_data, bool *result)
> + const size_t size, const uint8_t *wdg_data, bool *result)
> {
> - int i;
> + size_t i;
> int advice_given = 0;
>
> fwts_guid_info *info = (fwts_guid_info *)wdg_data;
> @@ -191,7 +191,7 @@ static void wmi_parse_wdg_data(fwts_framework *fw,
> }
>
> static void wmi_get_wdg_data(fwts_framework *fw,
> - fwts_list_link *item, const int size, uint8_t *wdg_data)
> + fwts_list_link *item, const size_t size, uint8_t *wdg_data)
> {
> char *str;
> uint8_t *data = wdg_data;
> @@ -228,7 +228,7 @@ static void wmi_get_wdg_data(fwts_framework *fw,
> if (data > wdg_data + size) {
> fwts_failed(fw, LOG_LEVEL_HIGH,
> "WMI_WDGBufferBad",
> - "_WDG buffer was more than %d bytes "
> + "_WDG buffer was more than %zu bytes "
> "long!", size);
> fwts_tag_failed(fw, FWTS_TAG_ACPI_BAD_LENGTH);
> return;
> @@ -242,7 +242,7 @@ static void wmi_parse_for_wdg(fwts_framework *fw,
> fwts_list_link *item, int *count, bool *result)
> {
> uint8_t *wdg_data;
> - int size;
> + size_t size;
> char *str = fwts_text_list_text(item);
>
> /* Parse Name(_WDG, Buffer, (0xXX) */
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list