From: Sami Kerola Date: Sun, 2 Nov 2014 20:26:26 +0000 (+0000) Subject: mkswap: remove unnecessary size check X-Git-Tag: v2.26-rc1~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c181617cfbe9e442b66de35fd45ffffc0c85500a;p=thirdparty%2Futil-linux.git mkswap: remove unnecessary size check Signed-off-by: Sami Kerola --- diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index a1b864d65b..b2713ab99c 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 1d91e41cee..3fce0d0fbe 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 */