From e26dd8f592d831bc9467d19ec93200f2b4cff550 Mon Sep 17 00:00:00 2001 From: Daniel Salzman <daniel.salzman@nic.cz> Date: Wed, 29 May 2013 15:31:24 +0200 Subject: [PATCH] journal: remove redundant magic string Change-Id: I882697e314d3f3ef731ef531f3ea7462640606e7 --- src/knot/server/journal.h | 6 +++--- src/knot/zone/zone-load.h | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/knot/server/journal.h b/src/knot/server/journal.h index 5753504532..a4218a978b 100644 --- a/src/knot/server/journal.h +++ b/src/knot/server/journal.h @@ -44,8 +44,6 @@ #include <stdint.h> #include <fcntl.h> -#include "knot/zone/zone-load.h" - /*! * \brief Journal entry flags. */ @@ -129,9 +127,11 @@ typedef int (*journal_apply_t)(journal_t *j, journal_node_t *n); * Journal defaults and constants. */ #define JOURNAL_NCOUNT 1024 /*!< Default node count. */ +#define JOURNAL_MAGIC {'k', 'n', 'o', 't', '1', '0', '5'} +#define MAGIC_LENGTH 7 /* HEADER = magic, crc, max_entries, qhead, qtail */ #define JOURNAL_HSIZE (MAGIC_LENGTH + sizeof(crc_t) + sizeof(uint16_t) * 3) -#define JOURNAL_MAGIC {'k', 'n', 'o', 't', '1', '0', '5'} + /*! * \brief Create new journal. diff --git a/src/knot/zone/zone-load.h b/src/knot/zone/zone-load.h index b20f3a8261..c0f1216b07 100644 --- a/src/knot/zone/zone-load.h +++ b/src/knot/zone/zone-load.h @@ -33,9 +33,6 @@ #include "knot/zone/semantic-check.h" #include "zscanner/file_loader.h" -#define MAGIC_LENGTH 8 -#define MAGIC "knotv130" - /* TODO this structure is highly redundant, remove. Maybe use oh-so-great BIRD lists. */ /*! * \brief One-purpose linked list holding pointers to RRSets. -- GitLab