diff options
author | Pranith Kumar K <pkarampu@redhat.com> | 2012-10-02 15:26:10 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-11-07 01:14:31 -0500 |
commit | 30153d0b9d52e2643bdea858dc71ee1aa2a3dba5 (patch) | |
tree | 892584b46c24bc78013ec84e1b16b79734f54c9a | |
parent | f37fc4022ffa3d37d4ccf9b49679d9738d9e1620 (diff) |
mgmt/glusterd: Use correct api for percent conversion
Change-Id: I66968366b6533562dd5f9bf14c26a58316487d0a
BUG: 862033
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/45
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index f997dec341e..be0514ae792 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -2122,8 +2122,9 @@ glusterd_get_quorum_cluster_counts (xlator_t *this, int *active_count, ret = dict_get_str (conf->opts, GLUSTERD_QUORUM_RATIO_KEY, &val); if (ret == 0) { - ratio = _gf_true; - (void)gf_string2double(val, &quorum_percentage); + ret = gf_string2percent(val, &quorum_percentage); + if (!ret) + ratio = _gf_true; } if (ratio) count = CEILING_POS (inquorum_count * |