Skip to content

Commit

Permalink
cli: Removing negative value check for unsigned variable (coverity fix)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nandajavarma authored and vbellur committed Apr 4, 2015
1 parent f7a14c0 commit 5e7cc20
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/src/cli-cmd-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5e7cc20

Please sign in to comment.