aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2019-10-02 10:58:27 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2019-10-02 10:58:27 +0000
commiteff4361d8864b68f990a54b4f7eb4b46d564f7ba (patch)
tree68ce6d984b1938f825c1b23e69ad2c4bd067a240
parent59efbf791dd0b498f68e4fe9d1751e1ce930b632 (diff)
downloadsrc-eff4361d8864b68f990a54b4f7eb4b46d564f7ba.tar.gz
src-eff4361d8864b68f990a54b4f7eb4b46d564f7ba.zip
Use size_t for byte_to_write variable when comparing to eeprom_info_out_len
which is also size_t in mlx5tool(8). Submitted by: slavash@ MFC after: 3 days Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/head/; revision=352992
-rw-r--r--usr.sbin/mlx5tool/mlx5tool.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/mlx5tool/mlx5tool.c b/usr.sbin/mlx5tool/mlx5tool.c
index a31575ea8bee..4d2cbe51cffa 100644
--- a/usr.sbin/mlx5tool/mlx5tool.c
+++ b/usr.sbin/mlx5tool/mlx5tool.c
@@ -206,7 +206,8 @@ mlx5tool_fw_reset(int ctldev, const struct mlx5_tool_addr *addr)
static void
mlx5tool_eeprom_print(struct mlx5_eeprom_get *eeprom_info)
{
- unsigned int byte_to_write, index_in_row, line_length, row;
+ int index_in_row, line_length, row;
+ size_t byte_to_write;
byte_to_write = 0;
line_length = 16;
@@ -214,7 +215,7 @@ mlx5tool_eeprom_print(struct mlx5_eeprom_get *eeprom_info)
printf("\nOffset\t\tValues\n");
printf("------\t\t------");
while (byte_to_write < eeprom_info->eeprom_info_out_len) {
- printf("\n0x%04X\t\t", byte_to_write);
+ printf("\n0x%04zX\t\t", byte_to_write);
for (index_in_row = 0; index_in_row < line_length;
index_in_row++) {
printf("%02X ",