[commit: ghc] master: tweak to minimize diff against ocInit_ELF (a483e71)

git at git.haskell.org git at git.haskell.org
Fri May 5 10:40:42 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a483e711da7834bc952367f554ac4e877b4e157a/ghc

>---------------------------------------------------------------

commit a483e711da7834bc952367f554ac4e877b4e157a
Author: Gabor Greif <ggreif at gmail.com>
Date:   Fri May 5 12:38:54 2017 +0200

    tweak to minimize diff against ocInit_ELF


>---------------------------------------------------------------

a483e711da7834bc952367f554ac4e877b4e157a
 rts/linker/MachO.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/linker/MachO.c b/rts/linker/MachO.c
index f8b665a..8895482 100644
--- a/rts/linker/MachO.c
+++ b/rts/linker/MachO.c
@@ -100,8 +100,8 @@ void
 ocInit_MachO(ObjectCode * oc)
 {
     oc->info = (struct ObjectCodeFormatInfo*)stgCallocBytes(
-                1, sizeof(struct ObjectCodeFormatInfo),
-                "ocInit_MachO(struct ObjectCodeFormatInfo)");
+                1, sizeof *oc->info,
+                "ocInit_MachO(ObjectCodeFormatInfo)");
     oc->info->header  = (MachOHeader *) oc->image;
     oc->info->symCmd  = NULL;
     oc->info->segCmd  = NULL;



More information about the ghc-commits mailing list