Skip to content

Commit

Permalink
mkswap: remove unnecessary size check
Browse files Browse the repository at this point in the history
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
  • Loading branch information
kerolasa authored and karelzak committed Nov 7, 2014
1 parent a1466ab commit c181617
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions disk-utils/mkswap.c
Expand Up @@ -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));
Expand Down
2 changes: 0 additions & 2 deletions include/swapheader.h
Expand Up @@ -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 */

0 comments on commit c181617

Please sign in to comment.