Skip to content

Commit

Permalink
Requested change
Browse files Browse the repository at this point in the history
  • Loading branch information
e0ff committed Aug 4, 2018
1 parent f165b04 commit e37a603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toxcore/Messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2926,13 +2926,13 @@ static uint32_t m_state_plugins_size(const Messenger *m)
bool m_register_state_plugin(Messenger *m, Messenger_State_Type type, m_state_size_cb size_cb, m_state_load_cb load_cb,
m_state_save_cb save_cb)
{
void *temp = realloc(m->options.state_plugins, sizeof(Messenger_State_Plugin) * (m->options.state_plugins_length + 1));
Messenger_State_Plugin *temp = (Messenger_State_Plugin *) realloc(m->options.state_plugins, sizeof(Messenger_State_Plugin) * (m->options.state_plugins_length + 1));

if (!temp) {
return false;
}

m->options.state_plugins = (Messenger_State_Plugin *) temp;
m->options.state_plugins = temp;
m->options.state_plugins_length++;

const uint8_t index = m->options.state_plugins_length - 1;
Expand Down

0 comments on commit e37a603

Please sign in to comment.