1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cov: always initialized values

Make sure values are initialized for all possible paths.
This commit is contained in:
Zdenek Kabelac 2020-08-29 20:27:32 +02:00
parent 85e2c7e14d
commit a481f42630
3 changed files with 3 additions and 3 deletions

View File

@ -176,7 +176,7 @@ static int _udev_dev_is_md_component(struct device *dev)
*/ */
static int _native_dev_is_md_component(struct device *dev, uint64_t *offset_found, int full) static int _native_dev_is_md_component(struct device *dev, uint64_t *offset_found, int full)
{ {
uint64_t size, sb_offset; uint64_t size, sb_offset = 0;
int ret; int ret;
if (!scan_bcache) if (!scan_bcache)

View File

@ -663,7 +663,7 @@ static int _read_hint_file(struct cmd_context *cmd, struct dm_list *hints, int *
int found = 0; int found = 0;
int keylen; int keylen;
int hv_major, hv_minor; int hv_major, hv_minor;
int major, minor; int major = -1, minor = -1;
int ret = 1; int ret = 1;
int i; int i;

View File

@ -5614,7 +5614,7 @@ static int _set_writecache_block_size(struct cmd_context *cmd,
uint32_t block_size = 0; uint32_t block_size = 0;
int lbs_unknown = 0, lbs_4k = 0, lbs_512 = 0; int lbs_unknown = 0, lbs_4k = 0, lbs_512 = 0;
int pbs_unknown = 0, pbs_4k = 0, pbs_512 = 0; int pbs_unknown = 0, pbs_4k = 0, pbs_512 = 0;
int rv; int rv = 0;
/* This is set if the user specified a writecache block size on the command line. */ /* This is set if the user specified a writecache block size on the command line. */
if (*block_size_sectors) if (*block_size_sectors)