From 3bc8ebda41f0fc9b69b7471e3c27f9185510d553 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Thu, 8 Jun 2017 20:48:01 -0400 Subject: [PATCH] bt_ctf_field_type_integer_set_size(): take unsigned int parameter MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Take unsigned int parameter like bt_ctf_field_type_integer_create(). Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- include/babeltrace/ctf-ir/field-types.h | 2 +- lib/ctf-ir/field-types.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/babeltrace/ctf-ir/field-types.h b/include/babeltrace/ctf-ir/field-types.h index 61dc291a..625a102e 100644 --- a/include/babeltrace/ctf-ir/field-types.h +++ b/include/babeltrace/ctf-ir/field-types.h @@ -831,7 +831,7 @@ extern int bt_ctf_field_type_integer_get_size( the integer fields described by a given integer field type. */ extern int bt_ctf_field_type_integer_set_size( - struct bt_ctf_field_type *int_field_type, size_t size); + struct bt_ctf_field_type *int_field_type, unsigned int size); /** @brief Returns whether or not the @intfields described by the @intft diff --git a/lib/ctf-ir/field-types.c b/lib/ctf-ir/field-types.c index 21794508..68ae5899 100644 --- a/lib/ctf-ir/field-types.c +++ b/lib/ctf-ir/field-types.c @@ -981,7 +981,7 @@ end: } int bt_ctf_field_type_integer_set_size(struct bt_ctf_field_type *type, - size_t size) + unsigned int size) { int ret = 0; struct bt_ctf_field_type_integer *integer; @@ -1009,14 +1009,14 @@ int bt_ctf_field_type_integer_set_size(struct bt_ctf_field_type *type, if (size == 0 || size > 64) { BT_LOGW("Invalid parameter: size must be between 1 and 64: " - "addr=%p, size=%zu", type, size); + "addr=%p, size=%u", type, size); ret = -1; goto end; } integer = container_of(type, struct bt_ctf_field_type_integer, parent); integer->size = size; - BT_LOGV("Set integer field type's size: addr=%p, size=%zu", + BT_LOGV("Set integer field type's size: addr=%p, size=%u", type, size); end: return ret; -- 2.34.1