From 6743ffb312461bd5a1021beef52534e63582d5cf Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 28 Nov 2016 13:10:51 +0200 Subject: Clarify comments on header legacy regions --- lib/header.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/header.c b/lib/header.c index 001a45159..c0b4601bc 100644 --- a/lib/header.c +++ b/lib/header.c @@ -354,7 +354,7 @@ unsigned headerSizeof(Header h, int magicp) /* Regions go in as is ... */ if (ENTRY_IS_REGION(entry)) { size += entry->length; - /* XXX Legacy regions do not include the region tag and data. */ + /* Reserve space for legacy region tag + data */ if (i == 0 && (h->flags & HEADERFLAG_LEGACY)) size += sizeof(struct entryInfo_s) + entry->info.count; continue; @@ -576,7 +576,7 @@ void * headerExport(Header h, unsigned int *bsize) il += ril; dl += entry->rdlen + entry->info.count; - /* XXX Legacy regions do not include the region tag and data. */ + /* Reserve space for legacy region tag */ if (i == 0 && (h->flags & HEADERFLAG_LEGACY)) il += 1; @@ -649,7 +649,7 @@ void * headerExport(Header h, unsigned int *bsize) src = (char *)entry->data; rdlen = entry->rdlen; - /* XXX Legacy regions do not include the region tag and data. */ + /* Legacy headers don't have regions originally, create one */ if (i == 0 && (h->flags & HEADERFLAG_LEGACY)) { int32_t stei[4]; -- cgit v1.2.1