1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-03 15: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:
jfreegman
2020-11-10 21:25:27 -05:00
parent 752fc6d619
commit 68e1ba312d
15 changed files with 120 additions and 86 deletions

View File

@ -158,7 +158,9 @@ void log_disable(struct chatlog *log)
fclose(log->file);
}
memset(log, 0, sizeof(struct chatlog));
*log = (struct chatlog) {
0
};
}
int log_enable(char *name, const char *selfkey, const char *otherkey, struct chatlog *log, int logtype)