When zeroing memory, use type independent code

Reduces the potential for bugs
This commit is contained in:
Kovid Goyal
2019-07-23 10:54:10 +05:30
parent d9f90ef077
commit 49429b5f49
7 changed files with 21 additions and 18 deletions

View File

@@ -11,7 +11,7 @@ static inline void parse_graphics_code(Screen *screen,
unsigned int i, code;
uint64_t lcode;
bool is_negative;
memset(&g, 0, sizeof(g));
zero_at_ptr(&g);
size_t sz;
static uint8_t payload[4096];