From a6dc153e47f9025b09e8aae14ca6ba96fa20a23e Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Thu, 27 Dec 2018 14:54:28 +0530 Subject: glusterd: coverity fixes This patch addresses coverity issues with CID 1398470 and 1398475 1398470 - Missing unlock - False positive, Added a annotation to make coverity happy 1398475 - Unused value Change-Id: I1bb3df0b716690fad8fc52c393c8b2b6c41f7860 updates: bz#789278 Signed-off-by: Sanju Rakonde --- xlators/mgmt/glusterd/src/glusterd-sm.c | 1 + xlators/mgmt/glusterd/src/glusterd.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c index 2d2e5c852eb..73a11a3eace 100644 --- a/xlators/mgmt/glusterd/src/glusterd-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-sm.c @@ -868,6 +868,7 @@ glusterd_ac_friend_remove(glusterd_friend_sm_event_t *event, void *ctx) "Cleanup returned: %d", ret); } out: + /* coverity[ LOCK] */ return 0; } diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 45f387a0be1..ff5af42079d 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1999,6 +1999,8 @@ init(xlator_t *this) op_version, GD_OP_VERSION_MAX); glusterd_recreate_volfiles(conf); ret = glusterd_store_max_op_version(this); + if (ret) + gf_log(this->name, GF_LOG_ERROR, "Failed to store max op-version"); } /* If the peer count is less than 2 then this would be the best time to -- cgit