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

cov: some initializers

This commit is contained in:
Zdenek Kabelac 2023-04-26 14:15:21 +02:00
parent 4fd2f433ad
commit 39b2bd06b8
2 changed files with 6 additions and 6 deletions

View File

@ -827,7 +827,7 @@ int fs_block_size_and_type(const char *pathname, uint32_t *fs_block_size_bytes,
{ {
blkid_probe probe = NULL; blkid_probe probe = NULL;
const char *type_str = NULL, *size_str = NULL; const char *type_str = NULL, *size_str = NULL;
size_t len; size_t len = 0;
int ret = 1; int ret = 1;
int rc; int rc;
@ -887,8 +887,8 @@ out:
int fs_get_blkid(const char *pathname, struct fs_info *fsi) int fs_get_blkid(const char *pathname, struct fs_info *fsi)
{ {
blkid_probe probe = NULL; blkid_probe probe = NULL;
const char *str; const char *str = "";
size_t len; size_t len = 0;
uint64_t fslastblock = 0; uint64_t fslastblock = 0;
unsigned int fsblocksize = 0; unsigned int fsblocksize = 0;
int rc; int rc;

View File

@ -96,7 +96,7 @@ static int _get_crypt_path(dev_t lv_devt, char *lv_path, char *crypt_path)
int lv_crypt_is_active(struct cmd_context *cmd, char *lv_path) int lv_crypt_is_active(struct cmd_context *cmd, char *lv_path)
{ {
char crypt_path[PATH_MAX]; char crypt_path[PATH_MAX] = { 0 };
struct stat st_lv; struct stat st_lv;
if (stat(lv_path, &st_lv) < 0) { if (stat(lv_path, &st_lv) < 0) {
@ -111,7 +111,7 @@ int fs_get_info(struct cmd_context *cmd, struct logical_volume *lv,
struct fs_info *fsi, int include_mount) struct fs_info *fsi, int include_mount)
{ {
char lv_path[PATH_MAX]; char lv_path[PATH_MAX];
char crypt_path[PATH_MAX]; char crypt_path[PATH_MAX] = { 0 };
struct stat st_lv; struct stat st_lv;
struct stat st_crypt; struct stat st_crypt;
struct stat st_top; struct stat st_top;
@ -234,7 +234,7 @@ int fs_mount_state_is_misnamed(struct cmd_context *cmd, struct logical_volume *l
char proc_fstype[FSTYPE_MAX]; char proc_fstype[FSTYPE_MAX];
char proc_devpath[PATH_MAX]; char proc_devpath[PATH_MAX];
char proc_mntpath[PATH_MAX]; char proc_mntpath[PATH_MAX];
char mtab_mntpath[PATH_MAX]; char mtab_mntpath[PATH_MAX] = { 0 };
char dm_devpath[PATH_MAX]; char dm_devpath[PATH_MAX];
char tmp_path[PATH_MAX]; char tmp_path[PATH_MAX];
char *dm_name; char *dm_name;