mkswap: remove unnecessary size check
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
a1466ab2b2
commit
c181617cfb
|
@ -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));
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue