Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix compiler warnings about buffer being too small. Yes, I know in th…
…eory it's too small which is why I used safe snprintf. Whatever, bigger buffer is path of least resistence
  • Loading branch information
graebm committed Oct 1, 2022
commit 2b8efb8d76fa0a70f89a40f7c2466dc54374de8c
8 changes: 3 additions & 5 deletions source/event_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ static void s_aws_event_loop_group_shutdown_async(struct aws_event_loop_group *e

aws_thread_init(&cleanup_thread, el_group->allocator);

struct aws_thread_options thread_options;
AWS_ZERO_STRUCT(thread_options);
thread_options.cpu_id = -1;
struct aws_thread_options thread_options = *aws_default_thread_options();
thread_options.join_strategy = AWS_TJS_MANAGED;

aws_thread_launch(&cleanup_thread, s_event_loop_destroy_async_thread_fn, el_group, &thread_options);
Expand Down Expand Up @@ -131,8 +129,8 @@ static struct aws_event_loop_group *s_event_loop_group_new(
thread_options.cpu_id = usable_cpus[i].cpu_id;
}

char thread_name[16] = {0};
snprintf(thread_name, sizeof(thread_name), "aws-io %d/%d", (int)i + 1, (int)el_count);
char thread_name[32] = {0};
snprintf(thread_name, sizeof(thread_name), "aws-io %d/%d", i + 1, el_count);
thread_options.name = aws_byte_cursor_from_c_str(thread_name);

struct aws_event_loop *loop = new_loop_fn(alloc, &options, new_loop_user_data);
Expand Down