diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2019-04-25 12:00:52 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2019-05-02 13:36:06 +0530 |
commit | 91c19c50a3c7b336177dda186500568be43626b8 (patch) | |
tree | 23e98195583ecd3e989f11792f86f0433bf18e85 /xlators/mgmt/glusterd/src/glusterd-brick-ops.c | |
parent | 60d6e90bd0565f8d56641ff97dd90348894ac870 (diff) |
glusterd: Fix coverity defects & put coverity annotations
Along with fixing few defect, put the required annotations for the defects which
are marked ignore/false positive/intentional as per the coverity defect sheet.
This should avoid the per component graph showing many defects as open in the
coverity glusterfs web page.
Updates: bz#789278
Change-Id: I19461dc3603a3bd8f88866a1ab3db43d783af8e4
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 4d18eb3cd96..4eef53eb2bd 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -1974,7 +1974,6 @@ glusterd_op_stage_remove_brick(dict_t *dict, char **op_errstr) case GF_OP_CMD_STATUS: ret = 0; goto out; - case GF_OP_CMD_DETACH_START: if (volinfo->type != GF_CLUSTER_TYPE_TIER) { snprintf(msg, sizeof(msg), @@ -1986,7 +1985,7 @@ glusterd_op_stage_remove_brick(dict_t *dict, char **op_errstr) errstr); goto out; } - + /* Fall through */ case GF_OP_CMD_START: { if ((volinfo->type == GF_CLUSTER_TYPE_REPLICATE) && dict_getn(dict, "replica-count", SLEN("replica-count"))) { @@ -2190,7 +2189,8 @@ out: if (op_errstr) *op_errstr = errstr; } - + if (!op_errstr && errstr) + GF_FREE(errstr); return ret; } @@ -2618,6 +2618,7 @@ glusterd_op_remove_brick(dict_t *dict, char **op_errstr) * Update defrag_cmd as well or it will only be done * for nodes on which the brick to be removed exists. */ + /* coverity[MIXED_ENUMS] */ volinfo->rebal.defrag_cmd = cmd; volinfo->rebal.defrag_status = GF_DEFRAG_STATUS_NOT_STARTED; ret = dict_get_strn(dict, GF_REMOVE_BRICK_TID_KEY, |