mkswap: remove unnecessary size check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2014-11-02 20:26:26 +00:00 committed by Karel Zak
parent a1466ab2b2
commit c181617cfb
2 changed files with 0 additions and 8 deletions

View File

@ -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));

View File

@ -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 */