From a0d100f8bc73f5ab88f989926ec51ce8b5980e79 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Wed, 31 May 2017 09:32:53 -0400 Subject: [PATCH] bt_value_get_type(): not a warning if value is NULL MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- lib/values.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/values.c b/lib/values.c index 65f53ebc9..8ddbe7de5 100644 --- a/lib/values.c +++ b/lib/values.c @@ -566,7 +566,11 @@ bt_bool bt_value_is_frozen(const struct bt_value *object) enum bt_value_type bt_value_get_type(const struct bt_value *object) { if (!object) { - BT_LOGW_STR("Invalid parameter: value object is NULL."); + /* + * Not an error: user can test NULL value object with + * this function. + */ + BT_LOGV_STR("Value object is NULL."); return BT_VALUE_TYPE_UNKNOWN; } -- 2.34.1