cli: Removing negative value check for unsigned variable (coverity fix)
CID: 1124663 Change-Id: Ic24014cdb9a68ed310c5e3dcf21fcebd6bf9da60 BUG: 789278 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/9669 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
parent
f7a14c0fe5
commit
5e7cc20d3c
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user