diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2020-09-01 21:08:12 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2020-09-01 23:40:24 +0200 |
commit | 66803586ef6d7ef7bcf4260b66e85ef2fa8c7022 (patch) | |
tree | 057925fbd23e9bb72fcc3400ee6ed2c7fbe4ca8e /tools/pvck.c | |
parent | 1ff1e86debe29abc0ac706e5e7b89fc5192f191f (diff) | |
download | lvm2-66803586ef6d7ef7bcf4260b66e85ef2fa8c7022.tar.gz |
pvck: use array of bytes
Fix typo in use array of pointers instead of array of bytes.
This fixes 'break strict-aliasing rules' warning printed with older gcc.
Diffstat (limited to 'tools/pvck.c')
-rw-r--r-- | tools/pvck.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pvck.c b/tools/pvck.c index 3895b7dd9..73ef6ceff 100644 --- a/tools/pvck.c +++ b/tools/pvck.c @@ -2498,7 +2498,7 @@ fail: static int _update_mda(struct cmd_context *cmd, struct metadata_file *mf, struct device *dev, int mda_num, uint64_t mda_offset, uint64_t mda_size) { - char *buf[512]; + char buf[512]; struct mda_header *mh; struct raw_locn *rlocn0, *rlocn1; uint64_t max_size; @@ -2514,7 +2514,7 @@ static int _update_mda(struct cmd_context *cmd, struct metadata_file *mf, struct goto fail; } - if (!dev_read_bytes(dev, mda_offset, 512, buf)) { + if (!dev_read_bytes(dev, mda_offset, sizeof(buf), buf)) { log_print("CHECK: failed to read mda_header_%d at %llu", mda_num, (unsigned long long)mda_offset); goto fail; |