summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorPaul Menzel <paulepanter@users.sourceforge.net>2015-10-05 20:02:09 +0200
committerPatrick Georgi <pgeorgi@google.com>2015-10-08 11:29:04 +0000
commitc824c262320a08b50ac804efec3128e799e4f712 (patch)
treed55934a5b29230c29695121b9b59512b741163e6 /src/lib
parent8a75d82fa5b3abb2473f207554454d9517ca5acb (diff)
downloadcoreboot-c824c262320a08b50ac804efec3128e799e4f712.tar.gz
coreboot-c824c262320a08b50ac804efec3128e799e4f712.tar.bz2
coreboot-c824c262320a08b50ac804efec3128e799e4f712.zip
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@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/11803 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/gcov-glue.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/gcov-glue.c b/src/lib/gcov-glue.c
index b1935454382e..3ec7d7a6477a 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;