summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/src/cli-cmd-parser.c4
-rw-r--r--libglusterfs/src/common-utils.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 799a64bb9..300091d97 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -1343,7 +1343,7 @@ cli_cmd_volume_top_parse (const char **words, int wordcount,
ret = gf_is_str_int (value);
if (!ret)
blk_size = atoi (value);
- if (ret || (blk_size < 0)) {
+ if (ret || (blk_size <= 0)) {
cli_out ("block size should be an integer "
"greater than zero");
ret = -1;
@@ -1354,7 +1354,7 @@ cli_cmd_volume_top_parse (const char **words, int wordcount,
ret = gf_is_str_int (value);
if (!ret)
count = atoi(value);
- if (ret || (count < 0)) {
+ if (ret || (count <= 0)) {
cli_out ("count should be an integer greater "
"zero");
ret = -1;
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index 0d850740e..e745ec0fa 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -1783,7 +1783,7 @@ gf_is_str_int (const char *value)
GF_VALIDATE_OR_GOTO ("", value, out);
- str = strdup (value);
+ str = gf_strdup (value);
if (!str)
goto out;