diff options
| author | Pranith Kumar K <pranithk@gluster.com> | 2012-09-27 00:49:54 +0530 |
|---|---|---|
| committer | Pranith Kumar K <pkarampu@redhat.com> | 2012-09-27 10:41:19 +0530 |
| commit | 13cfed388a19dd70984197fb14330d0277ba91e7 (patch) | |
| tree | 8e86f3cc4f441b3804741ee9dc6dbb9288269b12 /libglusterfs/src/common-utils.c | |
| parent | c8f9437b6ef507a4dc7fe03aa32a9fbf220d09f6 (diff) | |
mgmt/glusterd: Implementation of server-side quorum.
Feature-page:
http://www.gluster.org/community/documentation/index.php/Features/Server-quorum
Change-Id: Ifec0f1a697d390a29ba447a09750602fea1b3a4b
BUG: 840122
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Diffstat (limited to 'libglusterfs/src/common-utils.c')
| -rw-r--r-- | libglusterfs/src/common-utils.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 7e7eb461409..7662b7f971a 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -624,11 +624,10 @@ gf_string2time (const char *str, uint32_t *n) return 0; } - int -gf_string2percent (const char *str, uint32_t *n) +gf_string2percent (const char *str, double *n) { - unsigned long value = 0; + double value = 0; char *tail = NULL; int old_errno = 0; const char *s = NULL; @@ -649,7 +648,7 @@ gf_string2percent (const char *str, uint32_t *n) old_errno = errno; errno = 0; - value = strtol (str, &tail, 0); + value = strtod (str, &tail); if (errno == ERANGE || errno == EINVAL) return -1; |
