Skip to contentSkip to conversation

master - lvmlockd: set default result value

PATCH David Teigland 1 participant 1 message Feb 23, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=eccc91f9b0ef7387f46cdd93e3f44ab45e0c1ba3
Commit:        eccc91f9b0ef7387f46cdd93e3f44ab45e0c1ba3
Parent:        0236a34224d31a6ad7b48e451183672e907b15d3
Author:        David Teigland <[email protected]>
AuthorDate:    Tue Feb 23 14:35:40 2016 -0600
Committer:     David Teigland <[email protected]>
CommitterDate: Tue Feb 23 14:35:40 2016 -0600

lvmlockd: set default result value

The default error value should be set indicating
an error.

---
 lib/locking/lvmlockd.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
lib/locking/lvmlockd.c +2 -0
index a33544c..e78e2cb 100644
@@ -142,6 +142,8 @@ static int _lockd_result(daemon_reply reply, int *result, uint32_t *lockd_flags)
 	const char *flags_str = NULL;
 	const char *lock_type = NULL;
 
+	*result = -1;
+
 	if (reply.error) {
 		log_error("lockd_result reply error %d", reply.error);
 		return 0;