Skip to contentSkip to conversation

master - lvmetad: Fix previous commit

PATCH Marian Csontos 1 participant 1 message Mar 14, 2014

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=67c539f346a8259a4100ab10196486f8793fecce
Commit:        67c539f346a8259a4100ab10196486f8793fecce
Parent:        816197aaabbd41dd85d7728a6fd2992c148e124f
Author:        Marian Csontos <[email protected]>
AuthorDate:    Fri Mar 14 08:09:37 2014 +0100
Committer:     Marian Csontos <[email protected]>
CommitterDate: Fri Mar 14 08:09:37 2014 +0100

lvmetad: Fix previous commit

"%d" in buffer_append_vf is 64 bit wide. Using just int for the variable will fetch more from va_list than intended and shifting remaining arguments resulting in errors like:

    Internal error: Bad format string at '#orphan'
---
 daemons/lvmetad/lvmetad-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
daemons/lvmetad/lvmetad-core.c +2 -2
index 93a56c6..1b093cc 100644
@@ -863,8 +863,8 @@ static response pv_found(lvmetad_state *s, request r)
 	struct dm_config_tree *cft, *pvmeta_old_dev = NULL, *pvmeta_old_pvid = NULL;
 	char *old;
 	char *pvid_dup;
-	int complete = 0, orphan = 0, changed = 0;
-	int64_t seqno = -1, seqno_old = -1;
+	int complete = 0, orphan = 0;
+	int64_t seqno = -1, seqno_old = -1, changed = 0;
 
 	if (!pvid)
 		return reply_fail("need PV UUID");