From c181617cfbe9e442b66de35fd45ffffc0c85500a Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 2 Nov 2014 20:26:26 +0000 Subject: [PATCH] mkswap: remove unnecessary size check Signed-off-by: Sami Kerola --- disk-utils/mkswap.c | 6 ------ include/swapheader.h | 2 -- 2 files changed, 8 deletions(-) diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index a1b864d65..b2713ab99 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -115,12 +115,6 @@ write_uuid_and_label(unsigned char *uuid, char *volume_name) { struct swap_header_v1_2 *h; - /* Sanity check */ - if (sizeof(struct swap_header_v1_2) != SWAP_HEADER_SIZE) { - warnx(_("Bad swap header size, no label written.")); - return; - } - h = (struct swap_header_v1_2 *) signature_page; if (uuid) memcpy(h->uuid, uuid, sizeof(h->uuid)); diff --git a/include/swapheader.h b/include/swapheader.h index 1d91e41ce..3fce0d0fb 100644 --- a/include/swapheader.h +++ b/include/swapheader.h @@ -20,6 +20,4 @@ struct swap_header_v1_2 { uint32_t badpages[1]; }; -#define SWAP_HEADER_SIZE (sizeof(struct swap_header_v1_2)) - #endif /* _SWAPHEADER_H */