Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace memset with a loop #2465

Merged
merged 1 commit into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion other/bootstrap_daemon/docker/tox-bootstrapd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3c31e0cef0463b0a37bb21c5322c1a219314404b2a93193f4fba49f901a9dfb6 /usr/local/bin/tox-bootstrapd
92d0601d778487206505dce0bf89242b89b37424dc756808472fef3c22621ade /usr/local/bin/tox-bootstrapd
4 changes: 3 additions & 1 deletion toxcore/group_chats.c
Original file line number Diff line number Diff line change
Expand Up @@ -7224,7 +7224,9 @@ static int get_new_group_index(GC_Session *c)

c->chats[new_index] = empty_gc_chat;

memset(&c->chats[new_index].saved_invites, -1, sizeof(c->chats[new_index].saved_invites));
for (size_t i = 0; i < sizeof(c->chats[new_index].saved_invites)/sizeof(*c->chats[new_index].saved_invites); ++i) {
c->chats[new_index].saved_invites[i] = -1;
}

++c->chats_index;

Expand Down
Loading