summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/common-utils.c')
-rw-r--r--libglusterfs/src/common-utils.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index e4c7e2c31d5..6f40e7a6420 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -965,7 +965,13 @@ gf_string2ulong (const char *str, unsigned long *n)
int
gf_string2int (const char *str, int *n)
{
- return _gf_string2long (str, (long *) n, 0);
+ long l = 0;
+ int ret = 0;
+
+ ret = _gf_string2long (str, &l, 0);
+
+ *n = l;
+ return ret;
}
int