X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fplugins%2Fctf%2Flttng-live%2Fviewer-connection.c;h=9b9a78e255e67ee4b2894f40db938c9c24f8c8a1;hb=f80e9ec14e8608e514891297246112606975b5f8;hp=53358131fe9b9f0a707b0f27c4c1588ecd050627;hpb=99b4b64b7ac398ab304fe7009d0a352b4002e459;p=babeltrace.git diff --git a/src/plugins/ctf/lttng-live/viewer-connection.c b/src/plugins/ctf/lttng-live/viewer-connection.c index 53358131..9b9a78e2 100644 --- a/src/plugins/ctf/lttng-live/viewer-connection.c +++ b/src/plugins/ctf/lttng-live/viewer-connection.c @@ -304,7 +304,8 @@ int list_update_session(bt_value *results, const struct lttng_viewer_session *session, bool *_found, struct live_viewer_connection *viewer_connection) { - int i, len, ret = 0; + int ret = 0; + uint64_t i, len; bt_value *map = NULL; bt_value *hostname = NULL; bt_value *session_name = NULL; @@ -312,16 +313,11 @@ int list_update_session(bt_value *results, bool found = false; len = bt_value_array_get_length(results); - if (len < 0) { - BT_COMP_LOGE_STR("Error getting size of array."); - ret = -1; - goto end; - } for (i = 0; i < len; i++) { const char *hostname_str = NULL; const char *session_name_str = NULL; - map = bt_value_array_borrow_element_by_index(results, (size_t) i); + map = bt_value_array_borrow_element_by_index(results, i); if (!map) { BT_COMP_LOGE_STR("Error borrowing map."); ret = -1;