]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
mkswap: remove unnecessary size check
authorSami Kerola <kerolasa@iki.fi>
Sun, 2 Nov 2014 20:26:26 +0000 (20:26 +0000)
committerKarel Zak <kzak@redhat.com>
Fri, 7 Nov 2014 12:21:05 +0000 (13:21 +0100)
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
disk-utils/mkswap.c
include/swapheader.h

index a1b864d65b31f9fb71d608c02ea571397056358a..b2713ab99cbc0aad2f265dfb64405b29def0ff87 100644 (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));
index 1d91e41cee9c1acf483d31cf4250a757c7aed818..3fce0d0fbe07ba663e693a5725f6c37ea89f8440 100644 (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 */