Port: handle 'size_t' / 'off_t' on Solaris
[babeltrace.git] / cli / babeltrace.c
index 8b3d0c0fc9bea3d8037d75aa3b4ed3326722c5fe..a9d9f003d466feb3e49f93c6f515e2a9736475b6 100644 (file)
@@ -73,6 +73,8 @@ static const char* log_level_env_var_names[] = {
        "BABELTRACE_PLUGIN_CTF_METADATA_LOG_LEVEL",
        "BABELTRACE_PLUGIN_CTF_NOTIF_ITER_LOG_LEVEL",
        "BABELTRACE_PLUGIN_LTTNG_UTILS_DEBUG_INFO_FLT_LOG_LEVEL",
+       "BABELTRACE_PLUGIN_TEXT_DMESG_SRC_LOG_LEVEL",
+       "BABELTRACE_PLUGIN_UTILS_MUXER_FLT_LOG_LEVEL",
        "BABELTRACE_PLUGIN_UTILS_TRIMMER_FLT_LOG_LEVEL",
        "BABELTRACE_PYTHON_PLUGIN_PROVIDER_LOG_LEVEL",
        NULL,
@@ -1419,8 +1421,8 @@ int cmd_run_ctx_connect_upstream_port_to_downstream_component(
                assert(upstream_port_name);
 
                if (!bt_common_star_glob_match(
-                               cfg_conn->downstream_port_glob->str, -1ULL,
-                               downstream_port_name, -1ULL)) {
+                               cfg_conn->downstream_port_glob->str, SIZE_MAX,
+                               downstream_port_name, SIZE_MAX)) {
                        bt_put(downstream_port);
                        continue;
                }
@@ -1633,7 +1635,7 @@ int cmd_run_ctx_connect_upstream_port(struct cmd_run_ctx *ctx,
 
                if (!bt_common_star_glob_match(
                            cfg_conn->upstream_port_glob->str,
-                           -1ULL, upstream_port_name, -1ULL)) {
+                           SIZE_MAX, upstream_port_name, SIZE_MAX)) {
                        continue;
                }
 
@@ -1771,7 +1773,7 @@ void cmd_run_ctx_destroy(struct cmd_run_ctx *ctx)
 
        if (ctx->intersections) {
                g_hash_table_destroy(ctx->intersections);
-               ctx->components = NULL;
+               ctx->intersections = NULL;
        }
 
        BT_PUT(ctx->graph);
@@ -2008,7 +2010,6 @@ int set_stream_intersections(struct cmd_run_ctx *ctx,
                 */
                for (stream_idx = 0; stream_idx < stream_count; stream_idx++) {
                        const char *stream_path;
-                       gboolean hash_ret;
 
                        port_id = g_new0(struct port_id, 1);
                        if (!port_id) {
@@ -2071,9 +2072,7 @@ int set_stream_intersections(struct cmd_run_ctx *ctx,
 
                        BT_LOGD("Inserting stream intersection ");
 
-                       hash_ret = g_hash_table_insert(ctx->intersections,
-                               port_id, trace_range);
-                       assert(hash_ret);
+                       g_hash_table_insert(ctx->intersections, port_id, trace_range);
 
                        port_id = NULL;
                        trace_range = NULL;
@@ -2574,9 +2573,9 @@ void set_auto_log_levels(struct bt_config *cfg)
        while (*env_var_name) {
                if (!getenv(*env_var_name)) {
                        if (cfg->verbose) {
-                               setenv(*env_var_name, "I", 1);
+                               g_setenv(*env_var_name, "I", 1);
                        } else if (cfg->debug) {
-                               setenv(*env_var_name, "V", 1);
+                               g_setenv(*env_var_name, "V", 1);
                        } else {
                                char val[2] = { 0 };
 
@@ -2585,7 +2584,7 @@ void set_auto_log_levels(struct bt_config *cfg)
                                 * explicitly specified.
                                 */
                                val[0] = cfg->log_level;
-                               setenv(*env_var_name, val, 1);
+                               g_setenv(*env_var_name, val, 1);
                        }
                }
 
This page took 0.023915 seconds and 4 git commands to generate.