mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-07 06:46:36 +01: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:
@@ -59,7 +59,10 @@ void help_init_menu(ToxWindow *self)
|
||||
static void help_exit(ToxWindow *self)
|
||||
{
|
||||
delwin(self->help->win);
|
||||
memset(self->help, 0, sizeof(Help));
|
||||
|
||||
*(self->help) = (struct Help) {
|
||||
0
|
||||
};
|
||||
}
|
||||
|
||||
static void help_init_window(ToxWindow *self, int height, int width)
|
||||
|
||||
Reference in New Issue
Block a user