Skip to contentSkip to conversation

main - pvscan: enhance _count_pvid_files_from_lookup_file

PATCH Zdenek Kabelac 1 participant 1 message Feb 1, 2021

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a9fd207192fe81c1f89ca265c1fe0bcc54335694
Commit:        a9fd207192fe81c1f89ca265c1fe0bcc54335694
Parent:        3acf6040b558a121d918a478859ae0c97a679047
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Jan 22 22:27:05 2021 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Feb 1 12:13:49 2021 +0100

pvscan: enhance _count_pvid_files_from_lookup_file

Ensure all vars are always properly defined in all paths.

---
 tools/pvck.c   |  2 +-
 tools/pvscan.c | 56 +++++++++++++++++++++++++-------------------------------
 2 files changed, 26 insertions(+), 32 deletions(-)
tools/pvck.c +1 -1
index 88350de8c..c02ccb9f7 100644
@@ -3015,7 +3015,7 @@ int pvck(struct cmd_context *cmd, int argc, char **argv)
 	struct device *dev = NULL;
 	struct devicefile *def = NULL;
 	const char *dump, *repair;
-	const char *pv_name;
+	const char *pv_name = "";
 	uint64_t labelsector = 1;
 	int bad = 0;
 	int ret = 0;
tools/pvscan.c +25 -31

104 lines not on this page · raw message