@@ -8,6 +8,8 @@
#include "traceevent/event-parse.h"
+#define TRACECMD_MAGIC { 23, 8, 68 }
+
#define ARRAY_SIZE(_a) (sizeof(_a) / sizeof((_a)[0]))
#define __weak __attribute__((weak))
#define __noreturn __attribute__((noreturn))
@@ -2861,7 +2861,7 @@ struct hook_list *tracecmd_hooks(struct tracecmd_input *handle)
struct tracecmd_input *tracecmd_alloc_fd(int fd)
{
struct tracecmd_input *handle;
- char test[] = { 23, 8, 68 };
+ char test[] = TRACECMD_MAGIC;
unsigned int page_size;
char *version;
char buf[BUFSIZ];
@@ -14,7 +14,6 @@
#include "trace-local.h"
#define DEF_INPUT_FILE "trace.dat"
-#define MAGIC_HEAD { 0x17, 0x08, 0x44 }
#define TRACING_STR "tracing"
#define HEAD_PAGE_STR "header_page"
#define HEAD_PAGE_EVENT "header_event"
@@ -142,7 +141,7 @@ static int read_file_number(int fd, void *digit, int size)
static void dump_initial_format(int fd)
{
- char magic[] = MAGIC_HEAD;
+ char magic[] = TRACECMD_MAGIC;
char buf[DUMP_SIZE];
int val4;