[coreboot-gerrit] New patch to review for coreboot: lib/gcov-glue.c: Define macro `COVERAGE_MAGIC` and use it

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Mon Oct 5 18:06:36 CET 2015


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/11803

-gerrit

commit f126c21ab5377bef89287e1f7e0c635f6f29d8d8
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Mon Oct 5 20:02:09 2015 +0200

    lib/gcov-glue.c: Define macro `COVERAGE_MAGIC` and use it
    
    The macro is defined in `util/cbmem/cbmem.c` too, so do the same here,
    so that searching for that macro name shows all the usages.
    
    Change-Id: I52e9fa414fbbe2012bc6d00312db528efba3e564
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/lib/gcov-glue.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/gcov-glue.c b/src/lib/gcov-glue.c
index b193545..3ec7d7a 100644
--- a/src/lib/gcov-glue.c
+++ b/src/lib/gcov-glue.c
@@ -38,6 +38,8 @@ typedef struct file {
 
 #define COVERAGE_SIZE (32*1024)
 
+#define COVERAGE_MAGIC 0x584d41534
+
 static FILE *current_file = NULL;
 static FILE *previous_file = NULL;
 
@@ -56,7 +58,7 @@ static FILE *fopen(const char *path, const char *mode)
 
 	// TODO check if we're at the end of the CBMEM region (ENOMEM)
 	if (current_file) {
-		current_file->magic = 0x584d4153;
+		current_file->magic = COVERAGE_MAGIC;
 		current_file->next = NULL;
 		if (previous_file)
 			previous_file->next = current_file;



More information about the coreboot-gerrit mailing list