Cleanup: src.ctf.lttng-live: coding style
[babeltrace.git] / src / plugins / ctf / lttng-live / viewer-connection.c
index 9b9a78e255e67ee4b2894f40db938c9c24f8c8a1..c5f7c559bfb1ac4ed479e4091aead3ddd760e423 100644 (file)
@@ -74,8 +74,11 @@ ssize_t lttng_live_recv(struct live_viewer_connection *viewer_connection,
                        }
                }
        } while (ret > 0 && to_copy > 0);
-       if (ret > 0)
+
+       if (ret > 0) {
                ret = copied;
+       }
+
        /* ret = 0 means orderly shutdown, ret == BT_SOCKET_ERROR is error. */
        return ret;
 }
@@ -318,11 +321,6 @@ int list_update_session(bt_value *results,
                const char *session_name_str = NULL;
 
                map = bt_value_array_borrow_element_by_index(results, i);
-               if (!map) {
-                       BT_COMP_LOGE_STR("Error borrowing map.");
-                       ret = -1;
-                       goto end;
-               }
                hostname = bt_value_map_borrow_entry_value(map, "target-hostname");
                if (!hostname) {
                        BT_COMP_LOGE_STR("Error borrowing \"target-hostname\" entry.");
This page took 0.025362 seconds and 4 git commands to generate.