From 5e7cc20d3cc37a03f594237bdf85c67397c3ceac Mon Sep 17 00:00:00 2001 From: Nandaja Varma Date: Tue, 17 Feb 2015 17:27:03 +0530 Subject: cli: Removing negative value check for unsigned variable (coverity fix) CID: 1124663 Change-Id: Ic24014cdb9a68ed310c5e3dcf21fcebd6bf9da60 BUG: 789278 Signed-off-by: Nandaja Varma Reviewed-on: http://review.gluster.org/9669 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- cli/src/cli-cmd-parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cli') diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 1c2e14c7a5e..7c03ae228fd 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -2582,7 +2582,7 @@ cli_cmd_volume_top_parse (const char **words, int wordcount, int32_t list_cnt = -1; int index = 0; int perf = 0; - uint32_t blk_size = 0; + int32_t blk_size = 0; uint32_t count = 0; gf_boolean_t nfs = _gf_false; char *delimiter = NULL; @@ -2703,7 +2703,8 @@ cli_cmd_volume_top_parse (const char **words, int wordcount, ret = -1; goto out; } - ret = dict_set_uint32 (dict, "blk-size", blk_size); + ret = dict_set_uint32 (dict, "blk-size", + (uint32_t)blk_size); } else if (perf && !nfs && !strcmp (key, "count")) { ret = gf_is_str_int (value); if (!ret) -- cgit