mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-02 03:16:45 +02:00
Use compound literals to zero out structs instead of memset
This is cleaner and much less prone to bugs
This commit is contained in:
@ -1008,7 +1008,10 @@ static void realloc_calls(uint32_t n)
|
||||
void init_friend_AV(uint32_t index)
|
||||
{
|
||||
realloc_calls(CallControl.max_calls + 1);
|
||||
memset(&CallControl.calls[CallControl.max_calls], 0, sizeof(Call));
|
||||
|
||||
CallControl.calls[CallControl.max_calls] = (Call) {
|
||||
0
|
||||
};
|
||||
|
||||
if (index == CallControl.max_calls) {
|
||||
++CallControl.max_calls;
|
||||
|
Reference in New Issue
Block a user