Port: handle 'size_t' / 'off_t' on Solaris
[babeltrace.git] / cli / babeltrace.c
index 7c98cdf00b3c667f50376b3444050799cf6e2ae8..a9d9f003d466feb3e49f93c6f515e2a9736475b6 100644 (file)
@@ -1421,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;
                }
@@ -1635,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;
                }
 
@@ -2010,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) {
@@ -2073,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;
@@ -2576,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 };
 
@@ -2587,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.024549 seconds and 4 git commands to generate.