From: Philippe Proulx Date: Fri, 9 Jun 2017 00:48:01 +0000 (-0400) Subject: bt_ctf_field_type_integer_set_size(): take unsigned int parameter X-Git-Tag: v2.0.0-pre1~25 X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=3bc8ebda41f0fc9b69b7471e3c27f9185510d553;p=babeltrace.git bt_ctf_field_type_integer_set_size(): take unsigned int parameter Take unsigned int parameter like bt_ctf_field_type_integer_create(). Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- 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;