From 5608972a502ceb5bd5d8624db0c6b4e96e5c1080 Mon Sep 17 00:00:00 2001 From: Robert Pengelly Date: Tue, 8 Apr 2025 09:39:44 +0100 Subject: [PATCH] Use memset instead --- aout.c | 4 +++- elks.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/aout.c b/aout.c index f533ab3..19b08a4 100644 --- a/aout.c +++ b/aout.c @@ -458,7 +458,9 @@ void aout_write (const char *filename) { unsigned long data_size; struct section *text_section, *data_section, *bss_section; - struct aout_exec exec = { 0 }; + + struct aout_exec exec; + memset (&exec, 0, sizeof (exec)); if (!(fp = fopen (filename, "wb"))) { diff --git a/elks.c b/elks.c index 7d924bf..f4263db 100644 --- a/elks.c +++ b/elks.c @@ -456,7 +456,9 @@ void elks_write (const char *filename) { unsigned long data_size; struct section *text_section, *data_section, *bss_section; - struct elks_exec exec = { 0 }; + + struct elks_exec exec; + memset (&exec, 0, sizeof (exec)); if (!(fp = fopen (filename, "wb"))) { -- 2.34.1