Use memset instead
authorRobert Pengelly <robertapengelly@hotmail.com>
Tue, 8 Apr 2025 08:39:44 +0000 (09:39 +0100)
committerRobert Pengelly <robertapengelly@hotmail.com>
Tue, 8 Apr 2025 08:39:44 +0000 (09:39 +0100)
aout.c
elks.c

diff --git a/aout.c b/aout.c
index f533ab38263181e8a84fb90b83456f58c7371464..19b08a4c14fc417907d8934a17c6db7b03233a79 100644 (file)
--- 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 7d924bfe814ce53d695b68b87c0ed7e326a4239c..f4263db1f23af01cc740401ad5e5c14e78ba003b 100644 (file)
--- 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"))) {